public class OCalcDoc.Sheet
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
class |
OCalcDoc.Sheet.CellRange
A cell range.
|
class |
OCalcDoc.Sheet.Iterator
A cell iterator for a cell range.
|
| Modifier and Type | Method and Description |
|---|---|
OCalcDoc.Sheet.CellRange |
areaRange(int topLeftCol,
int topLeftRow,
int botRightCol,
int botRightRow)
Returns the cell range corresponding to a cell area;
|
OCalcDoc.Sheet.CellRange |
areaRange(java.lang.String address)
Returns the cell range corresponding to a cell range address in the format
top left cell:bottom right cell, e.g., E3:N12.
|
OTable.Cell |
cell(int colNum,
int rowNum)
Returns the cell corresponding to column and row number.
|
OTable.Cell |
cell(java.lang.String cellAddr)
Returns the cell corresponding to a cell address, e.g., B15.
|
OCalcDoc.Sheet.CellRange |
columnRange(int colNum)
Returns the cell range corresponding to a column.
|
void |
deleteColumns(int colNum,
int numCols)
Deletes contiguous columns from the sheet.
|
void |
deleteRows(int rowNum,
int numRows)
Deletes contiguous rows from the sheet.
|
void |
insertColumnsRight(int colNum,
int numCols)
Inserts contiguous columns to the sheet.
|
void |
insertRowsBelow(int rowNum,
int numRows)
Inserts contiguous rows to the sheet.
|
void |
mergeRowCells(int rowNum,
int leftColNum,
int rightColNum)
Merges cells in a row.
|
java.lang.String |
name()
Returns the sheet's name.
|
short |
number()
Returns the sheet's number.
|
void |
protect(java.lang.String password)
Password protects the sheet.
|
OCalcDoc.Sheet.CellRange |
rangeInUse()
Returns the cell range in use.
|
void |
remove()
Removes this sheet from the document.
|
OCalcDoc.Sheet.CellRange |
rowRange(int rowNum)
Returns the cell range corresponding to a row.
|
void |
setName(java.lang.String name)
Sets the sheet's name.
|
com.sun.star.sheet.XSpreadsheet |
xGetXSheet()
Gets the XSpreadsheet object.
|
public short number()
public java.lang.String name()
throws com.sun.star.uno.Exception
com.sun.star.uno.Exceptionpublic OCalcDoc.Sheet.CellRange columnRange(int colNum) throws com.sun.star.uno.Exception
colNum - the column numbercom.sun.star.uno.Exceptionpublic OCalcDoc.Sheet.CellRange rowRange(int rowNum) throws com.sun.star.uno.Exception
rowNum - the row numbercom.sun.star.uno.Exceptionpublic OCalcDoc.Sheet.CellRange areaRange(int topLeftCol, int topLeftRow, int botRightCol, int botRightRow) throws com.sun.star.uno.Exception
topLeftCol - the column number of the top left cell in the areatopLeftRow - the row number of the top left cellbotRightCol - the column number of the bottom right cellbotRightRow - the row number of the bottom right cellcom.sun.star.uno.Exceptionpublic OCalcDoc.Sheet.CellRange areaRange(java.lang.String address) throws com.sun.star.uno.Exception
address - the cell range addresscom.sun.star.uno.Exceptionpublic OTable.Cell cell(int colNum, int rowNum) throws com.sun.star.uno.Exception
colNum - the column numberrowNum - the row numbercom.sun.star.uno.Exceptionpublic OTable.Cell cell(java.lang.String cellAddr) throws com.sun.star.uno.Exception
cellAddr - the cell addresscom.sun.star.uno.Exceptionpublic OCalcDoc.Sheet.CellRange rangeInUse() throws com.sun.star.uno.Exception
com.sun.star.uno.Exceptionpublic void setName(java.lang.String name)
throws com.sun.star.uno.Exception
name - the namecom.sun.star.uno.Exceptionpublic void insertRowsBelow(int rowNum,
int numRows)
throws com.sun.star.uno.Exception
rowNum - the number of the row above the insertionnumRows - the number of rows to insertcom.sun.star.uno.Exceptionpublic void deleteRows(int rowNum,
int numRows)
throws com.sun.star.uno.Exception
rowNum - the number of the first row to be deletednumRows - the number of rows to deletecom.sun.star.uno.Exceptionpublic void insertColumnsRight(int colNum,
int numCols)
throws com.sun.star.uno.Exception
colNum - the number of the column to the left of the insertionnumCols - the number of columns to insertcom.sun.star.uno.Exceptionpublic void deleteColumns(int colNum,
int numCols)
throws com.sun.star.uno.Exception
colNum - the number of the first column to be deletednumCols - the number of columns to deletecom.sun.star.uno.Exceptionpublic void mergeRowCells(int rowNum,
int leftColNum,
int rightColNum)
throws com.sun.star.uno.Exception
rowNum - the row numberleftColNum - the number of the leftmost column to include in the mergerightColNum - the number of the rightmost column to include in the mergecom.sun.star.uno.Exceptionpublic void protect(java.lang.String password)
throws com.sun.star.uno.Exception
password - the passwordcom.sun.star.uno.Exceptionpublic void remove()
throws com.sun.star.uno.Exception
com.sun.star.uno.Exceptionpublic com.sun.star.sheet.XSpreadsheet xGetXSheet()