|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.extentech.ExtenXLS.WorkSheetHandle
public class WorkSheetHandle
The WorkSheetHandle provides a handle to a Worksheet within an XLS file
and includes convenience methods for working with the Cell values within the sheet.
for example:
WorkBookHandle book = new WorkBookHandle("testxls.xls");
WorkSheetHandle sheet1 = book.getWorkSheet("Sheet1");
CellHandle cell = sheet1.getCell("B22");
to add a cell:
CellHandle cell = sheet1.add("Hello World","C22");
to add a numeric cell:
CellHandle cell = sheet1.add(new Integer(120),"C23");
to add a formula cell:
CellHandle cell = sheet1.add("=PI()","C24");
WorkSheet,
WorkBookHandle,
CellHandle| Field Summary | |
|---|---|
static short |
ALLOWAUTOFILTER
enhanced protection settings: Use Autofilter |
static short |
ALLOWDELETECOLUMNS
enhanced protection settings: Delete columns |
static short |
ALLOWDELETEROWS
enhanced protection settings: Delete rows |
static short |
ALLOWFORMATCELLS
enhanced protection settings: Format cells |
static short |
ALLOWFORMATCOLUMNS
enhanced protection settings: Format columns |
static short |
ALLOWFORMATROWS
enhanced protection settings: Format rows |
static short |
ALLOWINSERTCOLUMNS
enhanced protection settings: Insert columns |
static short |
ALLOWINSERTHYPERLINKS
enhanced protection settings: Insert hyperlinks |
static short |
ALLOWINSERTROWS
enhanced protection settings: Insert rows |
static short |
ALLOWOBJECTS
enhanced protection settings: Edit Object |
static short |
ALLOWPIVOTTABLES
enhanced protection settings: Use PivotTable reports |
static short |
ALLOWSCENARIOS
enhanced protection settings: Edit scenario |
static short |
ALLOWSELLOCKEDCELLS
enhanced protection settings: Select locked cells |
static short |
ALLOWSELUNLOCKEDCELLS
enhanced protection settings: Select unlocked cells |
static short |
ALLOWSORT
enhanced protection settings: Sort |
static int |
ROW_DELETE
|
static int |
ROW_DELETE_NO_REFERENCE_UPDATE
|
static int |
ROW_INSERT
Same as ROW_INSERT_ONCE |
static int |
ROW_INSERT_MULTI
Insert row multiple times allowed |
static int |
ROW_INSERT_NO_REFERENCE_UPDATE
Insert row but do not update any cell references affected by insert |
static int |
ROW_INSERT_ONCE
Insert row one time, multiple calls ignored |
| Method Summary | |
|---|---|
CellHandle |
add(Date dt,
int row,
int col,
String fmt)
Add a java.sql.Date Cell to a WorkSheet. |
CellHandle |
add(Date dt,
String address,
String fmt)
Add a java.sql.Date Cell to a WorkSheet. |
CellHandle |
add(Object obj,
int row,
int col)
Add a Cell with the specified value to a WorkSheet. |
CellHandle |
add(Object obj,
int row,
int col,
int formatId)
Add a Cell with the specified value to a WorkSheet. |
CellHandle |
add(Object obj,
String address)
Add a Cell with the specified value to a WorkSheet. |
CellHandle |
add(Timestamp dt,
String address,
String fmt)
Add a java.sql.Timestamp Cell to a WorkSheet. |
AutoFilterHandle |
addAutoFilter(int column)
Adds a new AutoFilter for the specified column (0-based) in this sheet returns a handle to the new AutoFilter |
void |
addChart(byte[] serialchart,
String name,
short[] coords)
|
ColHandle |
addCol(int colNum)
adds the column (col1st, colLast) and returns the new ColHandle |
ColHandle |
addCol(int c1st,
int clast)
Deprecated. use addCol(int) |
CellHandle[] |
addValidated(Date dt,
int row,
int col,
String fmt)
Add a java.sql.Date Cell to a WorkSheet. |
CellHandle[] |
addValidated(Date dt,
String address,
String fmt)
Add a java.sql.Date Cell to a WorkSheet. |
CellHandle[] |
addValidated(Object obj,
int row,
int col)
Add a Cell with the specified value to a WorkSheet. |
CellHandle[] |
addValidated(Object obj,
int row,
int col,
int formatId)
Add a Cell with the specified value to a WorkSheet. |
CellHandle[] |
addValidated(Object obj,
String address)
Add a Cell with the specified value to a WorkSheet. |
CellHandle[] |
addValidated(Timestamp dt,
String address,
String fmt)
Add a java.sql.Timestamp Cell to a WorkSheet. |
List |
calculateAffectedCells(String CellAddress)
Calculates all formulas that reference the cell address passed in. |
boolean |
checkProtectionPassword(String guess)
Checks whether the given password matches the protection password. |
ConditionalFormatHandle |
createConditionalFormatHandle(String cellAddress,
String operator,
String value1,
String value2,
String format,
String firstCondition,
String secondCondition)
Create a Conditional Format handle for a cell/range |
CommentHandle |
createNote(String address,
String txt,
String author)
Creates a new annotation (Note or Comment) to the worksheeet, attached to a specific cell |
CommentHandle |
createNote(String address,
com.extentech.formats.XLS.Unicodestring txt,
String author)
Creates a new annotation (Note or Comment) to the worksheeet, attached to a specific cell The note or comment is a Unicode string, thus it can contain formatting information |
ValidationHandle |
createValidationHandle(String cellAddress,
byte valueType,
byte condition,
String errorBoxText,
String errorBoxTitle,
String promptBoxText,
String promptBoxTitle,
String firstCondition,
String secondCondition)
Create a validation handle for a cell/range |
void |
evaluateAutoFilters()
Updates the Row filter (hidden status) for each row on the sheet by evaluating all AutoFilter conditions |
void |
extractChartToDirectory(String outdir)
retrieves all charts for this sheet and writes them (in SVG form) to outpdir Filename is in form of: |
void |
extractImagesToDirectory(String outdir)
write out all of the images in the Sheet to a directory |
void |
fastAdd(Object obj,
int row,
int col,
int formatId)
Fast-adds a Cell with the specified value to a WorkSheet. |
void |
freezeCol(int col)
freezes the cols starting at the specified column and creating a scrollable sheet to the right |
void |
freezeRow(int row)
freezes the rows starting at the specified row and creating a scrollable sheet below this row |
com.extentech.toolkit.CompatibleVector |
getAddedrows()
|
ValidationHandle[] |
getAllValidationHandles()
Return all validation handles that refer to this worksheet |
AutoFilterHandle[] |
getAutoFilterHandles()
Returns a list of all AutoFilterHandles on this sheet An AutoFilterHandle allows access and manipulation of AutoFilters on the sheet |
CellHandle |
getCell(int row,
int col)
Returns a CellHandle for working with the value of a Cell on a WorkSheet. |
CellHandle |
getCell(int row,
int col,
boolean cache)
Returns a CellHandle for working with the value of a Cell on a WorkSheet. |
CellHandle |
getCell(String addr)
Returns a CellHandle for working with the value of a Cell on a WorkSheet. |
CellHandle[] |
getCells()
Returns all CellHandles defined on this WorkSheet. |
ColHandle |
getCol(int clnum)
returns the ColHandle for the column at index position the column index is zero based ie: column A = 0 |
ColHandle |
getCol(String name)
returns the Column at the named position |
List |
getColNames()
returns a List of Column names |
ColHandle[] |
getColumns()
returns all of the Columns in this WorkSheet |
CommentHandle[] |
getCommentHandles()
returns an array of all CommentHandles that exist in the sheet |
ConditionalFormatHandle[] |
getConditionalFormatHandles()
returns an array of FormatHandles for the ConditionalFormats applied to this cell |
boolean |
getEnhancedProtection(int protectionOption)
returns true if the indicated Enhanced Protection Setting is turned on |
boolean |
getFastCellAdds()
Get the current fast add cell mode for this worksheet |
int |
getFirstCol()
Get the first column on the Worksheet |
int |
getFirstRow()
Get the first row on the Worksheet |
String |
getFooterText()
Get the text for the Footer printed at the bottom of the Worksheet |
FormulaHandle |
getFormula(String addr)
Returns a FormulaHandle for working with the ranges of a formula on a WorkSheet. |
String |
getHashedProtectionPassword()
Gets the hash of the sheet protection password. |
String |
getHeaderText()
Get the text for the Header printed at the top of the Worksheet |
boolean |
getHidden()
get whether this sheet is hidden from the user opening the file. |
ImageHandle |
getImage(String name)
Get a handle to all of the images in this worksheet |
ImageHandle[] |
getImages()
Get a handle to all of the images in this worksheet |
int |
getLastCol()
Get the last column on the Worksheet |
int |
getLastRow()
Get the last row on the Worksheet |
boolean |
getManualGridLineColor()
Get whether to use manual grid color in the output sheet. |
com.extentech.formats.XLS.Boundsheet |
getMysheet()
FOR internal Use Only! |
NameHandle |
getNamedRangeInScope(String rangename)
Returns a Named Range Handle if it exists in the specified scope. |
NameHandle[] |
getNamedRangesInScope()
Returns all Named Range Handles scoped to this Worksheet. |
int |
getNumCols()
Returns the number of Columns in this WorkSheet |
int |
getNumImages()
returns the actual amount of images contained in the sheet and is determined by imageMap |
int |
getNumRows()
Returns the number of rows in this WorkSheet |
String |
getPrintArea()
Get the print area set for this WorkSheetHandle. |
PrinterSettingsHandle |
getPrinterSettings()
Get the printer settings handle for this WorkSheetHandle. |
boolean |
getProtected()
Returns whether the sheet is protected. |
RowHandle |
getRow(int t)
returns the RowHandle for the row at index position the row index is zero based ie: Excel row 1 = 0 |
Map |
getRowMap()
get an array of BIFFREC Rows |
List |
getRowNums()
returns a List of Row numbers |
RowHandle[] |
getRows()
get an array of all RowHandles for this WorkSheet |
boolean |
getSelected()
get whether this sheet is selected upon opening the file. |
byte[] |
getSerialBytes()
Returns the Serialized bytes for this WorkSheet. |
String |
getSheetName()
Returns the name of the Sheet. |
int |
getSheetNum()
Returns the index of the Sheet. |
boolean |
getShowFormulaResults()
Set whether to show calculated formula results in the output sheet. |
boolean |
getShowGridlines()
Get whether to show gridlines in the output sheet. |
boolean |
getShowInNormalView()
Get whether to show normal view or page break preview view in the output sheet. |
boolean |
getShowOutlineSymbols()
Get whether to show outline symbols in the output sheet. |
boolean |
getShowSheetHeaders()
Get whether to show sheet headers in the output sheet. |
boolean |
getShowZeroValues()
Get whether to show zero values in the output sheet. |
int |
getSplitColLocation()
gets the column number (0-based)that the sheet split is locaated on; if the sheet is not split, returns -1 |
int |
getSplitLocation()
Gets the twips split location returns -1 |
int |
getSplitRowLocation()
Gets the row number (0 based) that the sheet split is located on. |
int |
getTabIndex()
get the tab display order of this Worksheet this is a zero based index with zero representing the left-most WorkSheet tab. |
String |
getTopLeftCell()
if this sheet has freeze panes, return the address of the top left cell otherwise, return null |
boolean |
getUseCache()
|
Object |
getVal(String address)
Get the Object value of a Cell. |
ValidationHandle |
getValidationHandle(String cellAddress)
Get a validation handle for the cell address passed in. |
boolean |
getVeryHidden()
return the 'veryhidden' state of the sheet |
WorkBookHandle |
getWorkBook()
Returns the WorkBookHandle for this Sheet |
float |
getZoom()
gets the zoom for the sheet |
boolean |
hasDataValidations()
return true if sheet contains data validations |
boolean |
hasFrozenPanes()
Get whether there are freeze panes in the output sheet. |
void |
insertCol(int colnum)
Insert a blank column into the worksheet. |
void |
insertCol(String colnum)
Insert a blank column into the worksheet. |
void |
insertImage(ImageHandle im)
insert an image into this worksheet |
boolean |
insertRow(int rownum)
Insert a blank row into the worksheet. |
boolean |
insertRow(int rownum,
boolean shiftrows)
Insert a blank row into the worksheet. |
void |
insertRow(int rownum,
int flag)
Insert a blank row into the worksheet. |
CellHandle[] |
insertRow(int row1,
Object[] data)
Insert a row of Objects into the worksheet. |
CellHandle[] |
insertRow(int rownum,
Object[] data,
boolean shiftrows)
Insert a row of Objects into the worksheet. |
boolean |
insertRow(int rownum,
RowHandle copyRow,
int flag,
boolean shiftrows)
Insert a blank row into the worksheet. |
boolean |
insertRowAt(int rownum,
boolean shiftrows)
Insert a blank row into the worksheet. |
void |
moveCell(CellHandle c,
String addr)
Move a cell on this WorkSheet. |
void |
remove()
Remove this WorkSheet from the WorkBook NOTE: will throw a WorkBookException if the last sheet is removed. |
void |
removeAutoFilters()
Removes all AutoFilters from this sheet As a consequence, all previously hidden rows are shown or unhidden |
void |
removeCell(CellHandle celldel)
Remove a Cell from this WorkSheet. |
void |
removeCell(String celladdr)
Remove a Cell from this WorkSheet. |
void |
removeCol(String colstr)
Remove a Column and all associated Cells from this WorkSheet. |
void |
removeCol(String colstr,
boolean shiftcols)
Remove a Column and all associated Cells from this WorkSheet. |
void |
removeImage(ImageHandle img)
removes an Image from the Spreadsheet Jan 22, 2010 |
void |
removeRow(int rownum)
Remove a Row and all associated Cells from this WorkSheet. |
void |
removeRow(int rownum,
boolean shiftrows)
Remove a Row and all associated Cells from this WorkSheet. |
void |
removeRow(int rownum,
int flag)
Remove a Row and all associated Cells from this WorkSheet. |
void |
setCopyFormatsFromPriorWhenAdding(boolean f)
When adding a new Cell to the sheet, ExtenXLS can automatically copy the formatting from the Cell directly above the inserted Cell. |
void |
setEnhancedProtection(int protectionOption,
boolean set)
Sets the worksheet enhanced protection option |
void |
setFastCellAdds(boolean fastadds)
Toggle fast cell add mode. |
void |
setFirstVisibleTab()
set this WorkSheet as the first visible tab on the left |
void |
setFooterText(String t)
Set the text for the Footer printed at the bottom of the Worksheet |
void |
setHasFrozenPanes(boolean b)
Set whether there are freeze panes in the output sheet. |
void |
setHeaderText(String t)
Set the text for the Header printed at the top of the Worksheet |
void |
setHidden(boolean b)
set whether this sheet is hidden from the user opening the file. |
void |
setManualGridLineColor(boolean b)
Set whether to use manual grid color in the output sheet. |
void |
setPrintArea(CellRange printarea)
Sets the print area for the worksheet sets the printarea as a CellRange |
void |
setProtected(boolean protect)
Sets whether the worksheet is protected. |
void |
setProtected(boolean protect,
String password)
Sets whether the worksheet is protected. |
void |
setProtectionPassword(String password)
Sets the password used to unlock the sheet when it is protected. |
void |
setProtectionPasswordHashed(String hash)
Sets the password used to unlock the sheet when it is protected. |
void |
setSelected(boolean b)
set whether this sheet is selected upon opening the file. |
void |
setSheetName(String name)
Set the name of the Worksheet. |
void |
setShowFormulaResults(boolean b)
|
void |
setShowGridlines(boolean b)
Set whether to show gridlines in the output sheet. |
void |
setShowInNormalView(boolean b)
Set whether to show normal view or page break preview view in the output sheet. |
void |
setShowOutlineSymbols(boolean b)
Set whether to show outline symbols in the output sheet. |
void |
setShowSheetHeaders(boolean b)
Set whether to show sheet headers in the output sheet. |
void |
setShowZeroValues(boolean b)
Set whether to show zero values in the output sheet. |
void |
setTabIndex(int idx)
set the tab display order of this Worksheet this is a zero based index with zero representing the left-most WorkSheet tab. |
void |
setVal(String address,
double d)
Set the double value of the Cell at the given address |
void |
setVal(String address,
int i)
Set the int value of the Cell at the given address |
void |
setVal(String address,
Object val)
Set the Object value of the Cell at the given address. |
void |
setVal(String address,
String s)
Set the String value of the Cell at the given address |
void |
setVeryHidden(boolean b)
set whether this sheet is VERY hidden opening the file. |
void |
setZoom(float zm)
sets the zoom for the sheet |
void |
splitCol(int col,
int splitpos)
splits the worksheet at column col for nCols Note: unfreezes panes if frozen |
void |
splitRow(int row,
int splitpos)
splits the worksheet at row for nRows Note: unfreezes panes if frozen |
String |
toString()
Returns the name of this Sheet. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int ROW_INSERT_MULTI
public static final int ROW_INSERT
public static final int ROW_INSERT_ONCE
public static final int ROW_INSERT_NO_REFERENCE_UPDATE
public static final int ROW_DELETE
public static final int ROW_DELETE_NO_REFERENCE_UPDATE
public static final short ALLOWOBJECTS
public static final short ALLOWSCENARIOS
public static final short ALLOWFORMATCELLS
public static final short ALLOWFORMATCOLUMNS
public static final short ALLOWFORMATROWS
public static final short ALLOWINSERTCOLUMNS
public static final short ALLOWINSERTROWS
public static final short ALLOWINSERTHYPERLINKS
public static final short ALLOWDELETECOLUMNS
public static final short ALLOWDELETEROWS
public static final short ALLOWSELLOCKEDCELLS
public static final short ALLOWSORT
public static final short ALLOWAUTOFILTER
public static final short ALLOWPIVOTTABLES
public static final short ALLOWSELUNLOCKEDCELLS
| Method Detail |
|---|
public void addChart(byte[] serialchart,
String name,
short[] coords)
public int getFirstRow()
public int getFirstCol()
public int getLastRow()
public int getLastCol()
public void setProtected(boolean protect,
String password)
throws WorkBookException
protect is true, the worksheet will be
protected and the password will be set to password. If it's
false, the worksheet will be unprotected and the password
will be removed.
protect - whether the worksheet should be protectedpassword - the password to set if protect is true.
ignored when protect is false.
WorkBookException - never. This used to be thrown when
unprotecting if the password was incorrect.public void setProtected(boolean protect)
protect - whether worksheet protection should be enabledpublic void setProtectionPassword(String password)
password - the clear text of the password to be applied
or null to remove the existing passwordpublic void setProtectionPasswordHashed(String hash)
getHashedProtectionPassword() to copy the password from one
worksheet to another.
hash - the hash of the protection password to be applied
or null to remove the existing passwordpublic String getHashedProtectionPassword()
setProtectionPasswordHashed(java.lang.String) to apply the same password to
another worksheet.
public boolean getProtected()
public boolean checkProtectionPassword(String guess)
guess - the password to be checked against the stored hash
public void setEnhancedProtection(int protectionOption,
boolean set)
int - protectionOptionoptionspublic boolean getEnhancedProtection(int protectionOption)
protectionOption -
optionspublic void setVeryHidden(boolean b)
boolean - b hidden statepublic boolean getSelected()
public boolean getHidden()
public boolean getVeryHidden()
public void setHidden(boolean b)
boolean - b hidden statepublic void setFirstVisibleTab()
public int getTabIndex()
public void setTabIndex(int idx)
int - idx the new index of the sheet tabpublic void setSelected(boolean b)
boolean - b selected value
public ColHandle getCol(int clnum)
throws com.extentech.formats.XLS.ColumnNotFoundException
com.extentech.formats.XLS.ColumnNotFoundException
public ColHandle addCol(int c1st,
int clast)
c1st - clast -
public ColHandle addCol(int colNum)
colNum, - zero based number of the column
public ColHandle getCol(String name)
throws com.extentech.formats.XLS.ColumnNotFoundException
com.extentech.formats.XLS.ColumnNotFoundExceptionpublic ColHandle[] getColumns()
public List getColNames()
public List getRowNums()
public RowHandle getRow(int t)
throws com.extentech.formats.XLS.RowNotFoundException
int - row number to return
com.extentech.formats.XLS.RowNotFoundExceptionpublic RowHandle[] getRows()
public Map getRowMap()
public int getNumRows()
public int getNumCols()
public void removeCell(CellHandle celldel)
CellHandle - to removepublic void removeImage(ImageHandle img)
img - public void removeCell(String celladdr)
String - celladdr - the Address of the Cell to remove
public void removeRow(int rownum,
boolean shiftrows)
throws com.extentech.formats.XLS.RowNotFoundException
int - rownum - the number of the row to removeboolean - shiftrows - true will shift all lower rows up one.
com.extentech.formats.XLS.RowNotFoundException
public void removeRow(int rownum)
throws com.extentech.formats.XLS.RowNotFoundException
int - rownum - the number of the row to remove
uses default row deletion rules regarding updating references
com.extentech.formats.XLS.RowNotFoundException
public void removeRow(int rownum,
int flag)
throws com.extentech.formats.XLS.RowNotFoundException
int - rownum - the number of the row to removeint - flag - controls whether row deletions updates references as well ...
com.extentech.formats.XLS.RowNotFoundException
public void removeCol(String colstr)
throws com.extentech.formats.XLS.ColumnNotFoundException
String - colstr - the name of the column to remove
com.extentech.formats.XLS.ColumnNotFoundException
public void removeCol(String colstr,
boolean shiftcols)
throws com.extentech.formats.XLS.ColumnNotFoundException
String - colstr - the name of the column to removeboolean - shiftcols - true will shift following cols
com.extentech.formats.XLS.ColumnNotFoundExceptionpublic int getSheetNum()
public NameHandle[] getNamedRangesInScope()
public NameHandle getNamedRangeInScope(String rangename)
throws com.extentech.formats.XLS.CellNotFoundException
com.extentech.formats.XLS.CellNotFoundExceptionpublic String getSheetName()
public byte[] getSerialBytes()
WorkBookHandle.addWorkSheet(byte[] serialsheet, String NewSheetName)public boolean getUseCache()
public void setVal(String address,
Object val)
throws com.extentech.formats.XLS.CellNotFoundException,
com.extentech.formats.XLS.CellTypeMismatchException
String - Cell Address (ie: "D14")Object - new Cell Object value
com.extentech.formats.XLS.CellNotFoundException - is thrown if there is
no existing Cell at the specified address.
com.extentech.formats.XLS.CellTypeMismatchException
public void setVal(String address,
double d)
throws com.extentech.formats.XLS.CellNotFoundException,
com.extentech.formats.XLS.CellTypeMismatchException
String - Cell Address (ie: "D14")double - new Cell double valueaddress - d -
com.extentech.formats.XLS.CellNotFoundException - is
thrown if there is no existing Cell at the specified address.
com.extentech.formats.XLS.CellTypeMismatchException
public void setVal(String address,
String s)
throws com.extentech.formats.XLS.CellNotFoundException,
com.extentech.formats.XLS.CellTypeMismatchException
String - Cell Address (ie: "D14")String - new Cell String value
com.extentech.formats.XLS.CellNotFoundException - is thrown if there is no existing Cell at the specified address.
com.extentech.formats.XLS.CellTypeMismatchExceptionpublic void setSheetName(String name)
String - the new name for the Worksheet
public void setVal(String address,
int i)
throws com.extentech.formats.XLS.CellNotFoundException,
com.extentech.formats.XLS.CellTypeMismatchException
String - Cell Address (ie: "D14")int - new Cell int value
com.extentech.formats.XLS.CellNotFoundException - is thrown if there is no existing Cell at the specified address.
com.extentech.formats.XLS.CellTypeMismatchException
public Object getVal(String address)
throws com.extentech.formats.XLS.CellNotFoundException
com.extentech.formats.XLS.CellNotFoundException - is thrown if there is
no existing Cell at the specified address.
public CellHandle[] insertRow(int row1,
Object[] data)
an - array of Objects to insert into the new rowrownum - the rownumber to insertwhether - to shift down existing Cellspublic boolean insertRow(int rownum)
rownum - the rownumber to insert
public void insertRow(int rownum,
int flag)
rownum - the rownumber to insertflag - row insertion rule
public boolean insertRowAt(int rownum,
boolean shiftrows)
rownum - the rownumber to insertwhether - to shift down existing Cells
public boolean insertRow(int rownum,
boolean shiftrows)
rownum - the rownumber to insert (NOTE: rownum is 0-based)whether - to shift down existing Cells
public boolean insertRow(int rownum,
RowHandle copyRow,
int flag,
boolean shiftrows)
rownum - the rownumber to insertwhether - to shift down existing Cells
public CellHandle[] insertRow(int rownum,
Object[] data,
boolean shiftrows)
an - array of Objects to insert into the new rowrownum - the rownumber to insertwhether - to shift down existing Cellspublic ConditionalFormatHandle[] getConditionalFormatHandles()
public WorkBookHandle getWorkBook()
public ImageHandle getImage(String name)
throws com.extentech.formats.XLS.ImageNotFoundException
com.extentech.formats.XLS.ImageNotFoundExceptionpublic ImageHandle[] getImages()
public int getNumImages()
public void extractImagesToDirectory(String outdir)
imageoutput - directorypublic void extractChartToDirectory(String outdir)
outdir - String output folderpublic void insertImage(ImageHandle im)
im - -- the ImageHandle to insertImageHandlepublic void insertCol(int colnum)
colnum - the zero-based (0='A') Column to insertpublic void insertCol(String colnum)
colstr - the Column string to insertpublic void setCopyFormatsFromPriorWhenAdding(boolean f)
public CellHandle add(Object obj,
int row,
int col)
obj - the value of the new Cellint - row the row of the new Cellint - col the column of the new Cell
public CellHandle[] addValidated(Object obj,
int row,
int col)
throws com.extentech.formats.XLS.ValidationException
obj - the value of the new Cellint - row the row of the new Cellint - col the column of the new Cell
com.extentech.formats.XLS.ValidationException
public CellHandle[] addValidated(Object obj,
int row,
int col,
int formatId)
throws com.extentech.formats.XLS.ValidationException
obj - the value of the new Cellint - row the row of the new Cellint - col the column of the new Cellint - the format id to apply to this cell
com.extentech.formats.XLS.ValidationException
public CellHandle add(Object obj,
int row,
int col,
int formatId)
obj - the value of the new Cellint - row the row of the new Cellint - col the column of the new Cellint - the format id to apply to this cell
public void fastAdd(Object obj,
int row,
int col,
int formatId)
obj - the value of the new Cellint - row the row of the new Cellint - col the column of the new Cellint - the format id to apply to this cellpublic void setFastCellAdds(boolean fastadds)
fastadds - whether to disable checking for existing cells andpublic boolean getFastCellAdds()
public CellHandle add(Object obj,
String address)
obj - the value of the new Celladdress - the address of the new Cell
public CellHandle[] addValidated(Object obj,
String address)
throws com.extentech.formats.XLS.ValidationException
obj - the value of the new Celladdress - the address of the new Cell
com.extentech.formats.XLS.ValidationException
public CellHandle add(Timestamp dt,
String address,
String fmt)
dt - the value of the new java.sql.Timestamp Celladdress - the address of the new java.sql.Date Cellformatting - pattern the address of the new java.sql.Date Cell
public CellHandle[] addValidated(Timestamp dt,
String address,
String fmt)
throws com.extentech.formats.XLS.ValidationException
dt - the value of the new java.sql.Timestamp Celladdress - the address of the new java.sql.Date Cellformatting - pattern the address of the new java.sql.Date Cell
com.extentech.formats.XLS.ValidationException
public CellHandle add(Date dt,
String address,
String fmt)
dt - the value of the new java.sql.Date Cellrow - to add the datecol - to add the dateformatting - pattern the address of the new java.sql.Date Cell
public CellHandle[] addValidated(Date dt,
String address,
String fmt)
throws com.extentech.formats.XLS.ValidationException
dt - the value of the new java.sql.Date Cellrow - to add the datecol - to add the dateformatting - pattern the address of the new java.sql.Date Cell
com.extentech.formats.XLS.ValidationException
public CellHandle add(Date dt,
int row,
int col,
String fmt)
dt - the value of the new java.sql.Date Celladdress - the address of the new java.sql.Date Cellformatting - pattern the address of the new java.sql.Date Cell
public CellHandle[] addValidated(Date dt,
int row,
int col,
String fmt)
throws com.extentech.formats.XLS.ValidationException
dt - the value of the new java.sql.Date Celladdress - the address of the new java.sql.Date Cellformatting - pattern the address of the new java.sql.Date Cell
com.extentech.formats.XLS.ValidationExceptionpublic void remove()
public CellHandle[] getCells()
public FormulaHandle getFormula(String addr)
throws com.extentech.formats.XLS.FormulaNotFoundException,
com.extentech.formats.XLS.CellNotFoundException
addr - the address of the Cell
com.extentech.formats.XLS.FormulaNotFoundException - is thrown if there is no existing formula at the specified address.
com.extentech.formats.XLS.CellNotFoundException
public CellHandle getCell(String addr)
throws com.extentech.formats.XLS.CellNotFoundException
addr - the address of the Cell
com.extentech.formats.XLS.CellNotFoundException - is thrown if there is no existing Cell at the specified address.
public CellHandle getCell(int row,
int col)
throws com.extentech.formats.XLS.CellNotFoundException
int - Row the integer row of the Cellint - Col the integer col of the Cell
com.extentech.formats.XLS.CellNotFoundException - is thrown if there is no existing Cell at the specified address.
public CellHandle getCell(int row,
int col,
boolean cache)
throws com.extentech.formats.XLS.CellNotFoundException
int - Row the integer row of the Cellint - Col the integer col of the Cellboolean - whether to cache or return a new CellHandle each call
com.extentech.formats.XLS.CellNotFoundException - is thrown if there is no existing Cell at the specified address.
public void moveCell(CellHandle c,
String addr)
throws com.extentech.formats.XLS.CellPositionConflictException
CellHandle - c - the cell to be movedString - celladdr - the destination address of the cell
com.extentech.formats.XLS.CellPositionConflictExceptionpublic String getFooterText()
public String getHeaderText()
public String getPrintArea()
public PrinterSettingsHandle getPrinterSettings()
public void setPrintArea(CellRange printarea)
printarea - public void setHeaderText(String t)
String - header textpublic void setFooterText(String t)
String - footer textpublic String toString()
toString in class ObjectObject.toString()public com.extentech.formats.XLS.Boundsheet getMysheet()
public List calculateAffectedCells(String CellAddress)
public boolean getShowFormulaResults()
public void setShowFormulaResults(boolean b)
public boolean getShowGridlines()
boolean - whether to show gridlinespublic void setShowGridlines(boolean b)
public boolean getShowSheetHeaders()
public void setShowSheetHeaders(boolean b)
boolean - whether to show sheet headerspublic boolean getShowZeroValues()
public void setShowZeroValues(boolean b)
public boolean getShowOutlineSymbols()
public void setShowOutlineSymbols(boolean b)
boolean - whether to show outline symbolspublic boolean getShowInNormalView()
public void setShowInNormalView(boolean b)
boolean - whether to show normal view or page break preview viewpublic boolean hasFrozenPanes()
public void setHasFrozenPanes(boolean b)
boolean - whether there are freeze panespublic void setZoom(float zm)
the - zoom as a float percentage (.25 = 25%)public String getTopLeftCell()
public float getZoom()
public void freezeRow(int row)
row - the row to start the freezepublic void freezeCol(int col)
col - the col to start the freeze
public void splitCol(int col,
int splitpos)
col - col start col to splitsplitpos - position of the horizontal split
public void splitRow(int row,
int splitpos)
row - start row to splitsplitpos - position of the vertical splitpublic int getSplitRowLocation()
public int getSplitColLocation()
public int getSplitLocation()
public boolean getManualGridLineColor()
public void setManualGridLineColor(boolean b)
boolean - whether to use manual grid colorpublic com.extentech.toolkit.CompatibleVector getAddedrows()
public ConditionalFormatHandle createConditionalFormatHandle(String cellAddress,
String operator,
String value1,
String value2,
String format,
String firstCondition,
String secondCondition)
cellAddress - without sheetname. Can also be a range, such as A1:B5qualifier - = maps to CONDITION_* bytes in ConditionalFormatHandlevalue1 - = the error messagevalue2 - = the error titleformat - = the initial format string to use with the conditionfirstCondition - = formula stringsecondCondition - = 2nd formula string (optional)
public CommentHandle createNote(String address,
String txt,
String author)
address - -- address to attachtxt - -- text of noteauthor - -- name of author
CommentHandle
public CommentHandle createNote(String address,
com.extentech.formats.XLS.Unicodestring txt,
String author)
address - -- address to attachtxt - -- Unicode string of note with Formattingauthor - -- name of author
CommentHandlepublic CommentHandle[] getCommentHandles()
public ValidationHandle getValidationHandle(String cellAddress)
cell - address String
public ValidationHandle createValidationHandle(String cellAddress,
byte valueType,
byte condition,
String errorBoxText,
String errorBoxTitle,
String promptBoxText,
String promptBoxTitle,
String firstCondition,
String secondCondition)
cellAddress - without sheetname. Can also be a range, such as A1:B5valueType - = maps to VALUE_* bytes in ValidationHandlecondition - = maps to CONDITION_* bytes in ValidationHandleerrorBoxText - = the error messageerrorBoxTitle - = the error titlepromptBoxText - = the prompt (hover) messagepromptBoxTitle - = the prompt (hover) titlefirstCondition - = formula string, seeValidationHandle.setFirstConditionsecondCondition - = seeValidationHandle.setSecondCondition, this can be left null for validations that do not require a second argument.
public ValidationHandle[] getAllValidationHandles()
public boolean hasDataValidations()
public AutoFilterHandle[] getAutoFilterHandles()
public AutoFilterHandle addAutoFilter(int column)
int - column - column number to add an AutoFilter to
public void removeAutoFilters()
public void evaluateAutoFilters()
NOTE: This method must be called after Autofilter updates or additions in order to see the results of the AutoFilter(s)
NOTE: this evaluation is NOT done automatically due to performance considerations, and is designed to be called after all additions and updating is completed (as evaluation may be time-consuming)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||