Difference between revisions of "Documentation/DevGuide/Spreadsheets/Absolute Address"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Robot: Changing Category:Spreadsheet Documents)
m (Robot: Changing Category:Documentation/Developers Guide/Spreadsheet Documents)
Line 24: Line 24:
 
{{PDL1}}
 
{{PDL1}}
  
[[Category:Documentation/Developers Guide/Spreadsheet Documents]]
+
[[Category:Documentation/Developer's Guide/Spreadsheet Documents]]

Revision as of 10:19, 5 June 2008



The method getCellRangeAddress() of the interface com.sun.star.sheet.XCellRangeAddressable returns a com.sun.star.table.CellRangeAddress 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 cell ranges returned by other methods.

 // --- Get cell range address. ---
 com.sun.star.sheet.XCellRangeAddressable xRangeAddr = (com.sun.star.sheet.XCellRangeAddressable)
     UnoRuntime.queryInterface(com.sun.star.sheet.XCellRangeAddressable.class, xCellRange);
 aRangeAddress = xRangeAddr.getRangeAddress();
 System.out.println("Address of this range: Sheet=" + aRangeAddress.Sheet);
 System.out.println(
     "Start column=" + aRangeAddress.StartColumn + "; Start row=" + aRangeAddress.StartRow);
 System.out.println(
     "End column =" + aRangeAddress.EndColumn + "; End row =" + aRangeAddress.EndRow);
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools