Absolute Address

From Apache OpenOffice Wiki
< Documentation‎ | DevGuide
Revision as of 09:44, 4 June 2008 by OOoWikiBot (talk | contribs) (Robot: Changing Category:Spreadsheet Documents)
Jump to: navigation, search



The method getCellAddress() of the interface com.sun.star.sheet.XCellAddressable returns a com.sun.star.table.CellAddress struct that contains the absolute address of the cell in the spreadsheet document, including the sheet index. This is useful to get the address of cells returned by other methods.

 // --- Get cell address. ---
 com.sun.star.sheet.XCellAddressable xCellAddr = (com.sun.star.sheet.XCellAddressable)
     UnoRuntime.queryInterface(com.sun.star.sheet.XCellAddressable.class, xCell);
 com.sun.star.table.CellAddress aAddress = xCellAddr.getCellAddress();
 
 String aText = "Address of this cell: Column=" + aAddress.Column;
 aText += "; Row=" + aAddress.Row;
 aText += "; Sheet=" + aAddress.Sheet;
 System.out.println(aText);
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools