请帮我解决以下问题:我想使用 OOoTools.pas 界面确定开放办公室计算列中的最大值。这是我来的时候:
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:。” 为什么?谢谢