
:max_bytes(150000):strip_icc()/openofficeinsertfunction-15c6f11a21704f93bd5b94bdf1cc6379.jpg)
Now, two important methods of conversion object would return the human readable address of cell/range. OConv.Address = oActiveCell.getCellAddress OConv.Address = oActiveCell.getRangeAddress Once this instance is created, the Address property can be filled up from the selected cell’s/range’s address by using below snippet: OConv = ThisComponent.createInstance(".CellAddressConversion") OConv = ThisComponent.createInstance(".CellRangeAddressConversion") Create an instance of these to services using createInstance method. To get the address of selected cell and selected range, two different services should be used – .CellRangeAddressConversion and .CellAddressConversion. OActiveCell = ThisComponent.getCurrentSelection() Using the getCurrentSelection method, get a hold of the current selection of the controller. Often it was required to know what is the current selection and its addresses.ĭeclare some variables to hold activeCell and conversion instances. In Calc, one can select a single cell Or multiple cells i.e. This tutorial will show how to get the human readable address of selected cells and ranges using basic macro.
