|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
this interface describes the low level worksheet API.
Note: Methods in this class are not thread safe. You must assure that only one thread will call methods in this class, or you must acquire a lock on the workbook containing this sheet before calling any methods.
Model.getLock()| Method Summary | |
void |
addColPageBreak(int col)
Adds a vertical page break to the left edge of the specified column. |
GRObject |
addGRObject(short objectType,
double x1,
double y1,
double x2,
double y2)
Deprecated. Replaced by com.f1j.drawing.Drawing.addShape(com.f1j.drawing.EAutoShape, com.f1j.drawing.ClientAnchor). |
void |
addRowPageBreak(int row)
Adds a horizontal page break to the top edge of the specified row. |
void |
clearRange(int row1,
int col1,
int row2,
int col2,
short clearType)
Clears the specified range without checking for locked cells or partial clearing of array entered formulas. |
void |
copyDataFromArray(int row1,
int col1,
int row2,
int col2,
double[][] data)
Copies data from an array into a sheet. |
void |
copyDataToArray(int row1,
int col1,
int row2,
int col2,
double[][] data)
Copies data from the sheet into an array. |
void |
copyRange(int dstRow1,
int dstCol1,
int dstRow2,
int dstCol2,
Sheet srcSheet,
int srcRow1,
int srcCol1,
int srcRow2,
int srcCol2,
short what)
Copies a range of data from one worksheet to another. |
void |
editCopy(int nRow1,
int nCol1,
int nRow2,
int nCol2)
Copies the specified range to the clipboard. |
void |
editCut(int nRow1,
int nCol1,
int nRow2,
int nCol2)
Cuts the specified range to the clipboard. |
void |
editPaste(int nRow1,
int nCol1,
int nRow2,
int nCol2,
boolean bDone)
Pastes data from the clipboard to the specified range. |
void |
editPasteSpecial(int nRow1,
int nCol1,
int nRow2,
int nCol2,
short what)
Pastes data from the clipboard to the specified range. |
RangeRef |
getActiveRange()
Returns the range of the worksheet that is occupied by data. |
RangeRef |
getArrayFormulaRange(int row,
int col)
Returns the array formula range of the specified cell. |
AutoFilter |
getAutoFilter()
Returns the AutoFilter that is on this worksheet or null if there is no AutoFilter. |
Book |
getBook()
Returns the workbook containing this worksheet. |
java.lang.String |
getCodeName()
Returns the VBA object name of the worksheet. |
int |
getColOutlineLevel(int col)
Returns the outline level of a single specified column. |
short |
getColOutlineType(int col)
Returns the outline type of a single specified column. |
java.lang.String |
getColText(int col)
Returns the label for a column. |
int |
getColWidth(int col)
Returns the width of a single column. |
DataRange |
getDataRange(int index)
Returns the DataRange at the specified index. |
DataRangeCollection |
getDataRangeCollection()
Returns the DataRangeCollection for this sheet. |
int |
getDataRangeCount()
Returns the number of DataRanges on this worksheet. |
int |
getDefaultColWidth()
Returns the default column width. |
DataSet |
getDefaultDataSet()
Returns the default DataSet for this sheet. |
int |
getDefaultRowHeight()
Returns the default height for rows. |
Drawing |
getDrawing()
Returns a reference to the drawing. |
java.lang.String |
getEntry(int row,
int col)
Returns the text value of the specified cell in the current worksheet in edit mode format. |
java.lang.String |
getEntry(java.lang.String location)
Returns the value of the specified cell in edit mode format. |
GRObject |
getFirstGRObject()
Deprecated. |
java.lang.String |
getFormattedText(int row,
int col)
Returns the formatted text value of the specified cell. |
java.lang.String |
getFormula(int row,
int col)
Returns the text of the formula of the specified cell, in US English. |
GRObject |
getGRObject(int objectID)
Deprecated. Replaced by com.f1j.drawing.Drawing.getShape(int). |
GRObject |
getGRObject(java.lang.String objectName)
Deprecated. |
int |
getHeaderHeight()
Returns the height of the column headers. |
int |
getHeaderWidth()
Returns the width of the row headers. |
short |
getHiddenState()
Returns the hidden state for the sheet. |
java.lang.String |
getHyperlinkText(int nRow,
int nCol)
Retrieves the text of the hyperlink at the specified cell location. |
java.lang.String |
getHyperlinkToolTipText(int nRow,
int nCol)
Retrieves the hyperlink tool tip text for the specified cell location. |
int |
getHyperlinkType(int nRow,
int nCol)
Retrieves the type of the hyperlink at the specified cell location. |
int |
getLastCol()
Returns the number of the last occupied column for this sheet. |
int |
getLastColForRow(int row)
Returns the number of the last occupied column in the specified row. |
int |
getLastDataCol()
Returns the number of the last occupied column for this sheet. |
int |
getLastDataColForRow(int row)
Returns the number of the last occupied column in the specified row. |
int |
getLastDataRow()
Returns the number of the last occupied row. |
int |
getLastRow()
Returns the number of the last row that is not empty, including cells that contain only formatting. |
boolean |
getLogical(int row,
int col)
Returns the logical ( true or false) value of the
specified cell. |
java.lang.String |
getName()
Returns the name of the worksheet. |
double |
getNumber(int row,
int col)
Returns the numeric value of the specified cell. |
PivotRange |
getPivotRange(int index)
Returns the PivotRange at the specified index. |
int |
getPivotRangeCount()
Returns the number of PivotRanges on this worksheet. |
int |
getProtectionFlags()
Returns a set of flags indicating which actions are allowed when sheet protection is enabled. |
Range |
getRange(int row1,
int col1,
int row2,
int col2)
Returns a Range object for the specified coordinates. |
SheetProperties |
getReportFunctionsProperties()
Returns the Report Functions properties associated with this sheet. |
int |
getRowHeight(int row)
Returns the height of a single specified row. |
int |
getRowOutlineLevel(int row)
Returns the outline level of a single specified row. |
short |
getRowOutlineType(int row)
Returns the outline type of a single specified row. |
java.lang.String |
getRowText(int row)
Returns the name of the specified row. |
int |
getSheetNumber()
Returns the ordinal number of this worksheet within the workbook that contains it. |
short |
getSheetType()
Returns the sheet type. |
java.lang.String |
getText(int row,
int col)
Returns the text value of the specified cell. |
java.lang.String |
getTopLeftText()
Returns the text displayed at the intersection of the row and column headings in the top left corner. |
short |
getType(int row,
int col)
Returns the cell type of the specified cell. |
boolean |
hasAutoFilter()
true if the AutoFilter drop-down arrows are currently
displayed on the worksheet. |
boolean |
hasDrawing()
Returns true if the sheet currently has a drawing. |
boolean |
isAllowed(int protectionFlags)
Returns true if the sheet is not protected or if the
sheet's current protection settings allow all of the specified actions. |
boolean |
isArrayFormula(int row,
int col)
Returns true if the specified cell is part of an array formula. |
boolean |
isEnableProtection()
Deprecated. Replaced by #isProtected. |
boolean |
isFiltering()
Indicates whether this worksheet is in filter mode. |
boolean |
isHyperlink(int nRow,
int nCol)
Returns true if the cell at the specified position contains a hyperlink. |
boolean |
isLotusEvaluation()
Returns a flag indicating whether to evaluate formulas in a fashion compatible with Lotus 123. |
boolean |
isPasswordProtected()
Returns true if protection is enabled with a password for this sheet. |
boolean |
isProtected()
Returns true if protection is enabled for this sheet. |
boolean |
isRowHidden(int row)
Returns true if the row is hidden. |
void |
removeGRObject(GRObject object)
Deprecated. Replaced by com.f1j.drawing.Shape.delete(). |
void |
setArrayFormula(int row1,
int col1,
int row2,
int col2,
java.lang.String formula)
Sets the formula for the specified range to an array formula. |
void |
setCodeName(java.lang.String codeName)
Assigns a VBA object name to this worksheet. |
void |
setColOutlineCollapsed(int col,
boolean collapsed)
Sets whether an outline group is collapsed or expanded. |
void |
setColOutlineLevel(int col1,
int col2,
int outlineLevel,
boolean additive)
Sets the outline level of a range of columns. |
void |
setColText(int col,
java.lang.String colText)
Sets the label for a column. |
void |
setDefaultDataSet(DataSet dataSet)
Sets the default DataSet for this sheet. |
void |
setEnableProtection(boolean enableProtection)
Deprecated. Replaced by setProtection(boolean, String, int). |
void |
setEnableProtection(boolean enableProtection,
java.lang.String password)
Deprecated. Replaced by setProtection(boolean, String, int). |
void |
setEntry(int row,
int col,
java.lang.String entry)
Sets the value of a specified cell of all selected worksheets. |
void |
setEntry(java.lang.String location,
java.lang.String entry)
Sets the value of a specified cell. |
void |
setFormula(int row,
int col,
java.lang.String formula)
Sets the formula for the specified cell. |
void |
setHiddenState(short hiddenState)
Sets the hidden state for the sheet. |
void |
setLogical(int row,
int col,
boolean logical)
Sets the logical ( true or false) value of the
specified cell. |
void |
setLotusEvaluation(boolean lotusEvaluation)
Sets a flag indicating whether to evaluate formulas in a fashion compatible with Lotus 123. |
void |
setName(java.lang.String sheetName)
Assigns a name to this worksheet. |
void |
setNumber(int row,
int col,
double number)
Sets the numeric value of the specified cell. |
void |
setProtection(boolean enableProtection,
java.lang.String password,
int flags)
Sets whether protection is enabled for this sheet. |
void |
setReportFunctionsProperties(SheetProperties properties)
Sets the Report Functions properties that should be associated with this sheet. |
void |
setRowOutlineCollapsed(int row,
boolean collapsed)
Sets whether an outline group is collapsed or expanded. |
void |
setRowOutlineLevel(int row1,
int row2,
int outlineLevel,
boolean additive)
Sets the outline level of a range of rows. |
void |
setRowText(int row,
java.lang.String rowText)
Sets the name for the specified row. |
void |
setSheetType(short sheetType)
Sets the sheet type. |
void |
setText(int row,
int col,
java.lang.String text)
Sets the value of the specified cell for all selected sheets. |
void |
setTopLeftText(java.lang.String topLeftText)
Sets the text displayed at the intersection of the row and column headings in the top left corner of this worksheet. |
void |
showAllData()
Makes all rows of the currently filtered list visible. |
void |
sort(int row1,
int col1,
int row2,
int col2,
boolean sortByRows,
int[] keys)
Specifies a range of data to sort and the keys by which to sort it. |
| Method Detail |
public void addColPageBreak(int col)
col - indicates the column where the page break is added.addRowPageBreak(int)
public GRObject addGRObject(short objectType,
double x1,
double y1,
double x2,
double y2)
throws F1Exception
objectType - identifies the type of object to be created.x1 - coordinate of the first anchor point of the object.
x1 is measured in columns from the left edge of the worksheet.y1 - coordinate of the first anchor point of the object.
y1 is measured in rows from the top edge of the worksheet.x2 - coordinate of the second anchor point. x2 is measured in
columns from the left edge of the worksheet.y2 - coordinate of the second anchor point. y2 is measured in
rows from the top edge of the worksheet.public void addRowPageBreak(int row)
row - index number of the row where the page break is added. Rows are
indexed from top to bottom beginning with 0
public void clearRange(int row1,
int col1,
int row2,
int col2,
short clearType)
throws F1Exception
Rows are indexed from top to bottom beginning with 0; sheets and columns are indexed from left to right beginning with 0.
row1 - Coordinate specifying the beginning row of the range.col1 - Coordinate specifying the beginning column of the range.row2 - Coordinate specifying the ending row of the range.col2 - Coordinate specifying the ending column of the range.clearType - Determines what is cleared, as follows:
eClearFormats |
- clears formats only. |
eClearContents |
- clears values and formulas, including report range and pivot range content. |
eClearAll |
- clears all contents and formatting. |
copyRange(int, int, int, int, com.f1j.ss.Sheet, int, int, int, int, short)
public void copyDataFromArray(int row1,
int col1,
int row2,
int col2,
double[][] data)
throws F1Exception
The array and the sheet do not have to be the same size.
Rows are indexed from top to bottom beginning with 0; sheets and columns are indexed from left to right beginning with 0.
row1 - the coordinate specifying the beginning row to copy to.col1 - the coordinate specifying the beginning column to copy to.row2 - the coordinate of the ending row.col2 - the coordinate of the ending column.data - a 2-dimensional array to copy from.copyDataToArray(int, int, int, int, double[][])
public void copyDataToArray(int row1,
int col1,
int row2,
int col2,
double[][] data)
throws F1Exception
The array and the sheet range do not have to be the same size.
Rows are indexed from top to bottom beginning with 0; sheets and columns are indexed from left to right beginning with 0.
row1 - the coordinate of the beginning row.col1 - the coordinate of the beginning column.row2 - the coordinate of the ending row.col2 - the coordinate of the ending column.data - a 2-dimensional array to receive the data.copyDataFromArray(int, int, int, int, double[][])
public void copyRange(int dstRow1,
int dstCol1,
int dstRow2,
int dstCol2,
Sheet srcSheet,
int srcRow1,
int srcCol1,
int srcRow2,
int srcCol2,
short what)
throws F1Exception
this method allows you to choose the type of data to copy: formulas and data only, values only (w/o the formulas that created the value), formats only, or any combination of the previous types.
Rows are indexed from top to bottom beginning with 0; sheets and columns are indexed from left to right beginning with 0.
Note: this method does not check to see whether the workbook containing the source data needs to be recalculated. if you are copying values, not copying formulas from a range which may contain formulas, and not sure that the workbook containing this source range has been recalculated, you should call the checkRecalc method.
dstRow1 - the first row in the destination range.dstCol1 - the first column in the destination range.dstRow2 - the ending row in the destination range, inclusive.dstCol2 - the ending column in the destination range, inclusive.srcSheet - identifyies the source worksheet.srcRow1 - the first row in the source range.srcCol1 - the first column in the source range.srcRow2 - the ending row in the source range, inclusive.srcCol2 - the ending column in the source range, inclusive.what - the type of copy operation, using one or more of the following
constants:
eCopyFormulas = 1
eCopyValues = 2
eCopyFormats = 4
eCopyAll = 7clearRange(int, int, int, int, short)
public void editCopy(int nRow1,
int nCol1,
int nRow2,
int nCol2)
throws DataConflictException,
F1Exception
nRow1 - first rownCol1 - first colnRow2 - last rownCol2 - last coleditCut(int, int, int, int),
editPaste(int, int, int, int, boolean),
editPasteSpecial(int, int, int, int, short)
public void editCut(int nRow1,
int nCol1,
int nRow2,
int nCol2)
throws DataConflictException,
F1Exception
nRow1 - first rownCol1 - first colnRow2 - last rownCol2 - last coleditCopy(int, int, int, int),
editPaste(int, int, int, int, boolean),
editPasteSpecial(int, int, int, int, short)
public void editPaste(int nRow1,
int nCol1,
int nRow2,
int nCol2,
boolean bDone)
throws AccessDeniedException,
DataConflictException,
InvalidArgumentException,
F1Exception
nRow1 - first rownCol1 - first colnRow2 - last rownCol2 - last colbDone - true if the clipboard should be cleared after this operationeditCopy(int, int, int, int),
editCut(int, int, int, int),
editPasteSpecial(int, int, int, int, short)
public void editPasteSpecial(int nRow1,
int nCol1,
int nRow2,
int nCol2,
short what)
throws AccessDeniedException,
DataConflictException,
InvalidArgumentException,
F1Exception
nRow1 - first rownCol1 - first colnRow2 - last rownCol2 - last colwhat - what to paste, represented as one or more of the
following constants:
eCopyFormulas = 1
eCopyValues = 2
eCopyFormats = 4
eCopyAll = 7editCopy(int, int, int, int),
editCut(int, int, int, int),
editPaste(int, int, int, int, boolean)public RangeRef getActiveRange()
public RangeRef getArrayFormulaRange(int row,
int col)
row - the row of the specified cell.col - the column of the specified cell.public Book getBook()
public int getColOutlineLevel(int col)
col - the column number.getRowOutlineLevel(int),
setColOutlineLevel(int, int, int, boolean),
setRowOutlineLevel(int, int, int, boolean)public short getColOutlineType(int col)
col - the column number.eOutlineTerminal, eOutlineExpanded or
eOutlineCollapsed.getColOutlineLevel(int),
setColOutlineLevel(int, int, int, boolean),
setColOutlineCollapsed(int, boolean)public int getColWidth(int col)
Column width can be specified in units equal to 1/256th of the character 0's width in the default font, or in twips, depending on the column width units specified for the workbook.
col - identifies a column by number.BookModel.setColWidth(int, int, int, boolean)public java.lang.String getColText(int col)
col - identifies a column by number.null if no column text has been set.setColText(int, java.lang.String)public DataRangeCollection getDataRangeCollection()
DataRangeCollectionpublic int getDefaultColWidth()
public int getDefaultRowHeight()
getRowHeight(int)public Drawing getDrawing()
Returns a reference to the drawing.
if the sheet does not have a drawing, one is created. In some applications the automatic creation of a drawing may be undesirable because of memory footprint or file size concerns. if this is the case, call hasDrawing to determine whether the sheet has a drawing prior to calling this method.
hasDrawing()
public java.lang.String getEntry(int row,
int col)
for example, if the cell contains a formula, the text of the formula is displayed. Returned formulas are preceded by an equal sign (=).
Note: The returned string is always in the user's language and should only be used for interaction with the user.
row - the row number.col - the column number.setEntry(int, int, java.lang.String)
public java.lang.String getEntry(java.lang.String location)
throws F1Exception
for example, if the cell contains a formula, the text of the formula is returned. Returned formulas are preceded by an equal sign (=).
Note: The returned string is always in the user's language and should only be used for interaction with the user.
location - a defined name or a reference that identifies a cell.setEntry(int, int, java.lang.String)public GRObject getFirstGRObject()
public java.lang.String getFormattedText(int row,
int col)
throws F1Exception
this method returns the text as it is seen in the worksheet, including
all formatting. To return unformatted text, use the getText
or getEntry methods.
row - the row number of the cell from which the text is returned.col - the column number of the cell from which the text is returned.getText(int, int),
getEntry(int, int)
public java.lang.String getFormula(int row,
int col)
throws F1Exception
row - the row number of the cell.col - the column number of the cell.setFormula(int, int, java.lang.String)public GRObject getGRObject(int objectID)
objectID - the object's identification number.addGRObject(short, double, double, double, double),
removeGRObject(com.f1j.ss.GRObject)public GRObject getGRObject(java.lang.String objectName)
objectName - the name of the object.addGRObject(short, double, double, double, double),
removeGRObject(com.f1j.ss.GRObject)public int getHeaderHeight()
Header height is specified in twips. A twip is 1/1440 of an inch.
getHeaderWidth()public int getHeaderWidth()
The units used to store or display widths depends on the value of the
colWidthUnits setting. if the units are set to characters,
the width is specified in units equal to 1/256th of the 0 character's
width in the default font. if the units are set to twips, columns are
measured in twips, which are 1/1440 of an inch.
getHeaderHeight()public short getHiddenState()
| Tag | Description |
eSheetShown |
show the sheet. |
eSheetHidden |
hide the sheet. |
eSheetVeryHidden |
hide the sheet and disable the ability to reshow the sheet with the GUI. |
setHiddenState(short)
public java.lang.String getHyperlinkText(int nRow,
int nCol)
throws F1Exception
nRow - the row of the cell to inspectnCol - the column of the cell to inspect
public java.lang.String getHyperlinkToolTipText(int nRow,
int nCol)
throws F1Exception
nRow - the row of the cell to inspectnCol - the column of the cell to inspect
public int getHyperlinkType(int nRow,
int nCol)
throws F1Exception
nRow - the row of the cell to inspectnCol - the column of the cell to inspectpublic int getLastCol()
this method returns the last column that is not empty, including cells that contain only formatting.
getLastColForRow(int),
getLastDataCol(),
getLastDataRow(),
getLastDataColForRow(int),
getLastRow()public int getLastColForRow(int row)
this method returns the last column that is not empty, including cells that contain only formatting. -1 is returned for a row with no cells.
row - the specified row.getLastCol(),
getLastDataCol(),
getLastDataRow(),
getLastDataColForRow(int),
getLastRow()public int getLastDataCol()
this method returns the last column that contains data, ignoring cells that contain only formatting. -1 is returned for a row with no data cells.
getLastCol(),
getLastColForRow(int),
getLastDataRow(),
getLastDataColForRow(int),
getLastRow()public int getLastDataColForRow(int row)
this method returns the last column that contains data, ignoring cells that contain only formatting. -1 is returned for a row with no data cells.
row - the specified row.getLastCol(),
getLastColForRow(int),
getLastDataCol(),
getLastDataRow(),
getLastRow()public int getLastDataRow()
this method returns the last row that contains data, ignoring cells that contain only formatting. -1 is returned if the sheet contains no data cells.
getLastCol(),
getLastColForRow(int),
getLastDataCol(),
getLastDataColForRow(int),
getLastRow()public int getLastRow()
getLastCol(),
getLastColForRow(int),
getLastDataCol(),
getLastDataRow(),
getLastDataColForRow(int)
public boolean getLogical(int row,
int col)
throws F1Exception
true or false) value of the
specified cell.
if the cell contains a number, its logical value is true for
non-zero values, and false for zero values. if the cell has
text that can be converted to a number, the text is converted and treated
as a numeric cell. if the cell contains a formula, the above rules apply
depending on the formula's result. All other cells, including empty cells,
have a false logical value.
row - identifies the row by number.col - identifies the column by number.true/false.setLogical(int, int, boolean)
public double getNumber(int row,
int col)
Cells containing a formula return the numeric result of the formula. if a cell contains text, an attempt is made to convert the text to a number. if the text cannot be converted, 0 (No Error) is returned.
row - the row coordinate.col - the column coordinate.setNumber(int, int, double)public int getProtectionFlags()
kAllowDefault kAllowEditObjects kAllowFormatCells kAllowFormatColumns kAllowFormatRows kAllowInsertColumns kAllowInsertRows kAllowInsertHyperlinks kAllowDeleteColumns kAllowDeleteRows kAllowSelectLocked kAllowSort kAllowUseAutoFilter kAllowUsePivotRanges kAllowSelectUnlocked
isProtected(),
isPasswordProtected(),
setProtection(boolean, java.lang.String, int),
isAllowed(int),
BookModel.getSheetProtectionFlags(int),
Book.getProtectionFlags()public java.lang.String getRowText(int row)
Naming a row is useful for providing labels that reflect the data in the row. The row name is displayed in the row heading is used for display purposes only. The row is still referred to by normal cell references in formulas. Row names can be up to 254 characters long.
row - the row number.setRowText(int, java.lang.String)public java.lang.String getName()
setName(java.lang.String),
getCodeName()public java.lang.String getCodeName()
setCodeName(java.lang.String),
getName()public int getRowOutlineLevel(int row)
row - the row number.getColOutlineLevel(int),
setColOutlineLevel(int, int, int, boolean),
setRowOutlineLevel(int, int, int, boolean)public short getRowOutlineType(int row)
row - the row number.eOutlineTerminal, eOutlineExpanded or
eOutlineCollapsed.getRowOutlineLevel(int),
setRowOutlineLevel(int, int, int, boolean),
setRowOutlineCollapsed(int, boolean)public int getRowHeight(int row)
row - the row number.getDefaultRowHeight()public int getSheetNumber()
public short getSheetType()
eSheetTypeSheet
eSheetTypeChartsetSheetType(short)public boolean isAllowed(int protectionFlags)
true if the sheet is not protected or if the
sheet's current protection settings allow all of the specified actions.protectionFlags - One or more of the following flags:
kAllowDefault kAllowEditObjects kAllowFormatCells kAllowFormatColumns kAllowFormatRows kAllowInsertColumns kAllowInsertRows kAllowInsertHyperlinks kAllowDeleteColumns kAllowDeleteRows kAllowSelectLocked kAllowSort kAllowUseAutoFilter kAllowUsePivotRanges kAllowSelectUnlocked
true/false.getProtectionFlags(),
setProtection(boolean, java.lang.String, int),
isProtected(),
isPasswordProtected(),
BookModel.isAllowedSheetAction(int),
Book.isProhibited(int)
public boolean isArrayFormula(int row,
int col)
true if the specified cell is part of an array formula.row - specifies the row of the cell.col - specifies the column of the cell.true if the specified cell is part of an array formula.getArrayFormulaRange(int, int),
getFormula(int, int)public boolean isRowHidden(int row)
true if the row is hidden.row - identifies a row by number. Rows are indexed from top
to bottom beginning at 0.true/false
public java.lang.String getText(int row,
int col)
row - identifies the cell row by number.col - identifies the cell column by number.setText(int, int, java.lang.String)public java.lang.String getTopLeftText()
setTopLeftText(java.lang.String)
public short getType(int row,
int col)
row - identifies the cell row by number.col - identifies the cell column by number.
com.f1j.ss.Book.eTypeEmpty
com.f1j.ss.Book.eTypeNumber
com.f1j.ss.Book.eTypeText
com.f1j.ss.Book.eTypeLogical
com.f1j.ss.Book.eTypeError
A negative value indicates that the cell contains a formula.Selection.setType(short),
ConditionalFormat.setType(short)public boolean hasDrawing()
Returns true if the sheet currently has a drawing.
In applications where the presence of an empty drawing is considered undesirable because of memory footprint or file size concerns, this method should be called to see whether a drawing already exists in the sheet. this way the application can avoid a call to the getDrawing method, which would automatically create a drawing.
true/falsegetDrawing()public boolean isEnableProtection()
true if protection is enabled for this sheet.
Enabling protection means that any cells marked as hidden or locked are actually hidden and locked.
true/false.isPasswordProtected(),
setEnableProtection(boolean)public boolean isProtected()
true if protection is enabled for this sheet.
Enabling protection means that any cells marked as hidden or locked are actually hidden and locked.
true/false.isPasswordProtected(),
setProtection(boolean, java.lang.String, int),
getProtectionFlags(),
isAllowed(int),
BookModel.isSheetProtected(int),
Book.isProtected()
public boolean isHyperlink(int nRow,
int nCol)
true if the cell at the specified position contains a hyperlink.nRow - index of row that cell is onnCol - index of column that cell is ontrue/false.public boolean isLotusEvaluation()
setLotusEvaluation(boolean)public boolean isPasswordProtected()
true if protection is enabled with a password for this sheet.
this method returns false if protection is enabled without a password.
Enabling protection means that any cells marked as hidden or locked are
actually hidden and locked.true/false.isProtected(),
setProtection(boolean, java.lang.String, int),
getProtectionFlags(),
isAllowed(int),
BookModel.isSheetPasswordProtected(int),
Book.isPasswordProtected()
public void removeGRObject(GRObject object)
throws F1Exception
object - the GRObject to remove.addGRObject(short, double, double, double, double)
public void setArrayFormula(int row1,
int col1,
int row2,
int col2,
java.lang.String formula)
throws F1Exception
row1 - the first row in the range.col1 - the first column in the range.row2 - the last row in the range.col2 - the last column in the range.formula - formula for the specified cell. The string should
not have a leading equal sign (=).getFormula(int, int),
getArrayFormulaRange(int, int)
public void setColOutlineLevel(int col1,
int col2,
int outlineLevel,
boolean additive)
throws F1Exception
col1 - the first column in the range.col2 - the last column in the range.outlineLevel - the outline level to set. The outline level may be set
from zero to seven.additive - boolean. Specifies whether the outline level is an absolute
value to set or should be added to the current outline level. true
= the value specified in the outlineLevel parameter is added to
the current outline level of each column. false = the outline
level of the specified columns is set to the value specified in
the outlineLevel parameter.getColOutlineLevel(int),
getRowOutlineLevel(int),
setRowOutlineLevel(int, int, int, boolean)
public void setColOutlineCollapsed(int col,
boolean collapsed)
throws F1Exception
col - the column to expand or collapse. The column must currently have
an outline type of eOutlineCollapsed or
eOutlineExpanded.collapsed - boolean. true = collapse the outline group.
false = expand the outline group.getColOutlineLevel(int),
setColOutlineLevel(int, int, int, boolean),
getColOutlineType(int)
public void setColText(int col,
java.lang.String colText)
throws F1Exception
Naming a column is useful for labeling columns so they reflect the data in
the column (e.g., column G might be
named Total Sales). The column name is displayed in the column heading
and is used for display purposes only. The column is still referred to by
letter reference in formulas. The column name can be up to 9 lines and
254 bytes. A CR (carriage return) and LF (line
feed) combination are counted as two characters.
col - identifies a column by number.colText - the column label text.getColText(int)public void setEnableProtection(boolean enableProtection)
Enabling protection means that any cells marked as hidden or locked are actually hidden and locked.
enableProtection - boolean. Indicates whether protection
is to be enabled.isEnableProtection(),
isPasswordProtected()
public void setEnableProtection(boolean enableProtection,
java.lang.String password)
throws F1Exception
Enabling protection means that any cells marked as hidden or locked are actually hidden and locked.
enableProtection - boolean. Indicates whether protection
is to be enabled.password - The protection password. this may be null if
no password is to be used.isEnableProtection(),
isPasswordProtected()
public void setProtection(boolean enableProtection,
java.lang.String password,
int flags)
throws AccessDeniedException,
InvalidArgumentException,
ReportPreviewException,
F1Exception
Enabling protection means that any cells marked as hidden or locked are actually hidden and locked.
enableProtection - boolean. Indicates whether protection
is to be enabled.password - The protection password. this may be null if
no password is to be used.flags - kAllowNone if nothing should be allowed, or one or more of the following:
kAllowDefault kAllowEditObjects kAllowFormatCells kAllowFormatColumns kAllowFormatRows kAllowInsertColumns kAllowInsertRows kAllowInsertHyperlinks kAllowDeleteColumns kAllowDeleteRows kAllowSelectLocked kAllowSort kAllowUseAutoFilter kAllowUsePivotRanges kAllowSelectUnlocked
isProtected(),
isPasswordProtected(),
getProtectionFlags(),
isAllowed(int),
BookModel.setSheetProtection(int, boolean, java.lang.String, int),
Book.setProtection(boolean, java.lang.String, int)
public void setEntry(int row,
int col,
java.lang.String entry)
throws F1Exception
this method allows you to enter information in a cell just as a user would enter information. e.Spreadsheet automatically determines the kind of data entered (e.g., number, text, formula). e.Spreadsheet also recognizes dates, times, percentages, currency, fractions, and scientific notation and applies an appropriate number format. When setting formulas, precede the formula with an equal sign (=).
Note this value is always in the user's language and should only be used to interact with the user.
row - a row number that identifies a cell.col - a column number that identifies a cell.entry - a cell value.getEntry(int, int)
public void setEntry(java.lang.String location,
java.lang.String entry)
throws F1Exception
this method allows you to enter information in a cell just as a user would enter information. e.Spreadsheet automatically determines the kind of data entered (e.g., number, text, formula). e.Spreadsheet also recognizes dates, times, percentages, currency, fractions, and scientific notation and applies an appropriate number format. When setting formulas, precede the formula with an equal sign (=).
Note this value is always in the user's language and should only be used to interact with the user.
location - a defined name or a reference that identifies a cell.entry - a cell value.