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

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Robot: Changing Category:Spreadsheet Documents)
m (FINAL VERSION FOR L10N)
(One intermediate revision by the same user not shown)
Line 7: Line 7:
 
|NextPage=Documentation/DevGuide/Spreadsheets/Cell Annotations
 
|NextPage=Documentation/DevGuide/Spreadsheets/Cell Annotations
 
}}
 
}}
{{DISPLAYTITLE:Absolute Address}}
+
{{Documentation/DevGuideLanguages|Documentation/DevGuide/Spreadsheets/{{SUBPAGENAME}}}}
 +
{{DISPLAYTITLE:Absolute Address}}
 
<!--<idltopic>com.sun.star.sheet.XCellAddressable</idltopic>-->
 
<!--<idltopic>com.sun.star.sheet.XCellAddressable</idltopic>-->
 
The method <code>getCellAddress()</code> of the interface <idl>com.sun.star.sheet.XCellAddressable</idl> returns a <idl>com.sun.star.table.CellAddress</idl> 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.  
 
The method <code>getCellAddress()</code> of the interface <idl>com.sun.star.sheet.XCellAddressable</idl> returns a <idl>com.sun.star.table.CellAddress</idl> 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.  
Line 24: Line 25:
 
{{PDL1}}
 
{{PDL1}}
  
[[Category:Documentation/Developers Guide/Spreadsheet Documents]]
+
[[Category:Documentation/Developer's Guide/Spreadsheet Documents]]

Revision as of 10:25, 14 May 2009



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
In other languages