Difference between revisions of "Documentation/DevGuide/Spreadsheets/Column and Row Access"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (1 revision(s))
m (FINAL VERSION FOR L10N)
(2 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
|NextPage=Documentation/DevGuide/Spreadsheets/Data Array
 
|NextPage=Documentation/DevGuide/Spreadsheets/Data Array
 
}}
 
}}
{{DISPLAYTITLE:Column and Row Access}}
+
{{Documentation/DevGuideLanguages|Documentation/DevGuide/Spreadsheets/{{SUBPAGENAME}}}}
 +
{{DISPLAYTITLE:Column and Row Access}}
 
<!--<idltopic>com.sun.star.table.XColumnRowRange</idltopic>-->
 
<!--<idltopic>com.sun.star.table.XColumnRowRange</idltopic>-->
 
The cell range interface <idl>com.sun.star.table.XColumnRowRange</idl> accesses the column and row ranges in the current cell range. A column or row range contains all the cells in the selected column or row. This type of range has additional properties, such as, visibility, and width or height. For more information, see [[Documentation/DevGuide/Spreadsheets/Columns and Rows|Columns and Rows]].
 
The cell range interface <idl>com.sun.star.table.XColumnRowRange</idl> accesses the column and row ranges in the current cell range. A column or row range contains all the cells in the selected column or row. This type of range has additional properties, such as, visibility, and width or height. For more information, see [[Documentation/DevGuide/Spreadsheets/Columns and Rows|Columns and Rows]].
Line 31: Line 32:
  
 
{{PDL1}}
 
{{PDL1}}
[[Category: Spreadsheet Documents]]
+
 
 +
[[Category:Documentation/Developer's Guide/Spreadsheet Documents]]

Revision as of 10:23, 14 May 2009



The cell range interface com.sun.star.table.XColumnRowRange accesses the column and row ranges in the current cell range. A column or row range contains all the cells in the selected column or row. This type of range has additional properties, such as, visibility, and width or height. For more information, see Columns and Rows.


 // --- Column properties. ---
 com.sun.star.table.XColumnRowRange xColRowRange = (com.sun.star.table.XColumnRowRange)
     UnoRuntime.queryInterface(com.sun.star.table.XColumnRowRange.class, xCellRange);
 com.sun.star.table.XTableColumns xColumns = xColRowRange.getColumns();
 
 Object aColumnObj = xColumns.getByIndex(0);
 xPropSet = (com.sun.star.beans.XPropertySet) UnoRuntime.queryInterface(
     com.sun.star.beans.XPropertySet.class, aColumnObj);
 xPropSet.setPropertyValue( "Width", new Integer( 6000 ) );
 
 com.sun.star.container.XNamed xNamed = (com.sun.star.container.XNamed)
     UnoRuntime.queryInterface(com.sun.star.container.XNamed.class, aColumnObj);
 System.out.println("The name of the wide column is " + xNamed.getName() + ".");
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages