Code: Select all
sub callindex()
dim oFunAccess as object
oFunAccess = createUnoService( "com.sun.star.sheet.FunctionAccess" )
dim oDoc, oSheet, oRange as object
oDoc = ThisComponent
oSheet = oDoc.sheets.getByName("Sheet1")
oRange = oSheet.getCellRangeByName("a1:a47")
num = oFunAccess.CallFunction( "index",array(oRange,3))
print num
end sub
Code: Select all
sub callindex()
dim oFunAccess as object
oFunAccess = createUnoService( "com.sun.star.sheet.FunctionAccess" )
dim oDoc, oSheet, oRange as object
oDoc = ThisComponent
oSheet = oDoc.sheets.getByName("Sheet1")
oRange = oSheet.getCellRangeByName("a1:a47")
dim oPar(1) as object
oPar(0) = oRange
oPar(1) = 3
num = oFunAccess.CallFunction( "index",oPar)
print num
end sub
https://i.sstatic.net/BSmBbGzu.png
How can fix it?
