Data Array

From Apache OpenOffice Wiki
< Documentation‎ | DevGuide
Revision as of 15:22, 3 January 2021 by DiGro (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The contents of a cell range that are stored in a 2-dimensional array of objects are set and obtained by the interface

  • The method getDataArray() returns a 2-dimensional array with the contents of all cells of the range.
  • The method setDataArray() fills the data of the passed array into the cells. An empty cell is created by an empty string. The size of the array has to fit in the size of the cell range.

The following example uses the cell range xCellRange that has the size of 2 columns and 3 rows.

  // --- Cell range data --- xData = (
      UnoRuntime.queryInterface(, xCellRange);
  Object[][] aValues =
      {new Double(1.1), new Integer(10)},
      {new Double(2.2), new String("")},
      {new Double(3.3), new String("Text")}
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages