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

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Robot: Changing Category:Documentation/Developers Guide/Spreadsheet Documents)
 
(One intermediate revision by one other user not shown)
Line 7: Line 7:
 
|NextPage=Documentation/DevGuide/Spreadsheets/Fill Series
 
|NextPage=Documentation/DevGuide/Spreadsheets/Fill Series
 
}}
 
}}
{{DISPLAYTITLE:Absolute Address}}
+
{{Documentation/DevGuideLanguages|Documentation/DevGuide/Spreadsheets/{{SUBPAGENAME}}}}
 +
{{DISPLAYTITLE:Absolute Address}}
 
<!--<idltopic>com.sun.star.sheet.XCellRangeAddressable</idltopic>-->
 
<!--<idltopic>com.sun.star.sheet.XCellRangeAddressable</idltopic>-->
 
The method <code>getCellRangeAddress()</code> of the interface <idl>com.sun.star.sheet.XCellRangeAddressable</idl> returns a <idl>com.sun.star.table.CellRangeAddress</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 cell ranges returned by other methods.  
 
The method <code>getCellRangeAddress()</code> of the interface <idl>com.sun.star.sheet.XCellRangeAddressable</idl> returns a <idl>com.sun.star.table.CellRangeAddress</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 cell ranges returned by other methods.  
 
<!--[SOURCE:Spreadsheet/SpreadsheetSample.java]-->
 
<!--[SOURCE:Spreadsheet/SpreadsheetSample.java]-->
 
+
<syntaxhighlight lang="java">
 
   // --- Get cell range address. ---
 
   // --- Get cell range address. ---
 
   com.sun.star.sheet.XCellRangeAddressable xRangeAddr = (com.sun.star.sheet.XCellRangeAddressable)
 
   com.sun.star.sheet.XCellRangeAddressable xRangeAddr = (com.sun.star.sheet.XCellRangeAddressable)
Line 21: Line 22:
 
   System.out.println(
 
   System.out.println(
 
       "End column =" + aRangeAddress.EndColumn + "; End row =" + aRangeAddress.EndRow);
 
       "End column =" + aRangeAddress.EndColumn + "; End row =" + aRangeAddress.EndRow);
 
+
</syntaxhighlight>
 
{{PDL1}}
 
{{PDL1}}
  
 
[[Category:Documentation/Developer's Guide/Spreadsheet Documents]]
 
[[Category:Documentation/Developer's Guide/Spreadsheet Documents]]

Latest revision as of 15:23, 3 January 2021



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