Download StarOffice™ Programmer`s Tutorial

Transcript
This function accepts the corners of the range in any order, it determines the top, left,
bottom, and right cells to pass to getCellRangeByPosition().
If you have a range of cells, you might want to work with a single cell. This can be
achieved with getCellByPosition( ):
oCell = oCellRange.getCellByPosition(0,0)
would return the cell at the top left corner of the range. All values passed to
getCellByPosition( ) are relative to the range. To get the right bottom cell, you’d
use
nCols = oCellRange.Columns.Count
nRows = oCellRange.Rows.Count
oCell = oCellRange.getCellByPosition(nCols - 1, nRows -1)
Note that we subtract 1 from the number of rows and columns here, because the
numbering starts at zero.
4.4.1.1
Calculations
You can perform some simple calculations on ranges without using a formula.
Using StarOffice API - Building blocks
67