Difference between revisions of "Documentation/DevGuide/Text/Indexed Cells and Cell Ranges"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Robot: Changing Category:Documentation/Developers Guide/Text Documents)
m (FINAL VERSION FOR L10N)
 
Line 6: Line 6:
 
|NextPage=Documentation/DevGuide/Text/Table Naming, Sorting, Charting and Autoformatting
 
|NextPage=Documentation/DevGuide/Text/Table Naming, Sorting, Charting and Autoformatting
 
}}
 
}}
{{DISPLAYTITLE:Indexed Cells and Cell Ranges}}
+
{{Documentation/DevGuideLanguages|Documentation/DevGuide/Text/{{SUBPAGENAME}}}}
 +
{{DISPLAYTITLE:Indexed Cells and Cell Ranges}}
 
The interface <idl>com.sun.star.table.XCellRange</idl> provides access to cells using their row and column index as position, and to create sub ranges of tables:
 
The interface <idl>com.sun.star.table.XCellRange</idl> provides access to cells using their row and column index as position, and to create sub ranges of tables:
  

Latest revision as of 10:09, 14 May 2009



The interface com.sun.star.table.XCellRange provides access to cells using their row and column index as position, and to create sub ranges of tables:

 com::sun::star::table::XCell getCellByPosition( [in] long nColumn, [in] long nRow) 
 com::sun::star::table::XCellRange getCellRangeByPosition( [in] long nLeft, [in] long nTop, 
                                                           [in] long nRight, [in] long nBottom) 
 com::sun::star::table::XCellRange getCellRangeByName( [in] string aRange) 

The method getCellByPosition() returns a cell object supporting the interfaces com.sun.star.table.XCell and com.sun.star.text.XText. To find the cell the name is internally created from the position using the naming scheme described above and returns this cell if it exists. Calling getCellByPosition(1, 1) in the table at the beginning of this chapter returns the cell "B2" .

The methods getCellRangeByPosition() and getCellRangeByName() return a range object that is described below. The name of the range is created with the top-left cell and bottom-right cell of the table separated by a colon : as in A1:B4. Both methods fail when the structure of the table contains merged or split cells.

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages