Tested with AOO 4.1.3 and Win7 x64 Pro
I stored this function in a spreadsheet:
Code: Select all
Function TEST(sCell)
oDoc = thisComponent
oCtrl = oDoc.currentController
oSheet = oCtrl.activeSheet
oCell = oSheet.getCellRangeByName(sCell)
Test = sCell & " contains: " & oCell.string
End function
Code: Select all
=TEST("C1")
I don't know why CurrentController is void.
Functions must be calculated after document is loaded.
Did you think is a bug?