0
请帮助我: 我想使用OOoTools.pas 界面确定开放式办公室计算列中的最大值。 以此为FAS,因为我来了:OpenOffice Automation Delphi如何使用callfunction
Procedure FindMaximum(oMySheet : Variant);
Var
oFuncService : Variant;
Begin
oFuncService := CreateUnoService('com.sun.star.sheet.FunctionAccess');
ShowMessage(oFuncService.callFunction('MAX', VarArrayOf([10,20,50])));
End;
这工作
我当然要填写的一列类似的值:
ShowMessage(oFuncService.callFunction('MAX', VarArrayOf([oMySheet.getCellRangeByName('K8:K10')])));
我得到的消息“com.star .lang.IllegalArgumentException:”。为什么? 谢谢
错误:= oFuncService.callFunction( 'MAX',VarArrayOf([oCellRange])); – addelichtman 2010-10-14 15:06:40
Hello The_Fox,然后出现“Type Mismatch”错误 – addelichtman 2010-10-14 15:11:11
@addelichtman:K8:K10范围内可能有无效值吗?文字而不是数值? – 2010-10-14 15:53:28