34
In an UNO extension for OpenOffice/LibreOffice Calc (Spreadsheet), written in Java, how can you determine the calling cell inside the implementation of a UDF (spreadsheet function)?
Remarks
- In Excel/VBA this is possible via
Application.Caller - The main motivation to get the caller is logging/tracing/debugging, i.e., view the calling cell as part of a stack trace.
- It should be possible to obtain this information, since built-in functions like "ROW()" and "COLUMN()" do have some knowledge of the calling cell.
- An application where this possibility is used (for Excel) is Obba, an object handler for spreadsheets. Here the "control panel" provides a list of (Java) exceptions including the calling cell, i.e., the cell is part of the stack trace. See the following screenshot:

This is also a feature request on the Apache OpenOffice Bugzilla