public interface WorkSheet extends Handle
WorkSheetHandle| Modifier and Type | Field and Description |
|---|---|
static int |
ROW_INSERT |
static int |
ROW_KEEP |
| Modifier and Type | Method and Description |
|---|---|
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,
String address)
Add a Cell with the specified value to a WorkSheet.
|
void |
addChart(byte[] serialchart,
String name) |
CellHandle |
getCell(int row,
int col)
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 Column at the index position
|
ColHandle |
getCol(String name)
returns the Column at the named position
|
List<?> |
getColNames()
returns a Vector of Column names
|
ColHandle[] |
getColumns()
returns all of the Columns in 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 |
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.
|
int |
getLastCol()
Get the last column on the Worksheet
|
int |
getLastRow()
Get the last row on the Worksheet
|
Mergedcells |
getMergedCellsRec() |
int |
getNumCols()
Returns the number of Columns in this WorkSheet
|
int |
getNumRows()
Returns the number of rows in this WorkSheet
|
RowHandle |
getRow(int t)
get an a RowHandle for
this WorkSheet by number
|
List<?> |
getRowNums()
returns a Vector 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.
|
Sheet |
getSheet()
Returns the low-level OpenXLS Sheet.
|
String |
getSheetName()
Returns the name of the Sheet.
|
int |
getTabIndex()
get the tab display order of this Worksheet
this is a zero based index with zero representing
the left-most WorkSheet tab.
|
Object |
getVal(String address)
Get the Object value of a Cell.
|
WorkBook |
getWorkBook() |
void |
insertCol(String colnum)
Insert a blank column into the worksheet.
|
void |
insertRow(int rownum)
Insert a blank row into the worksheet.
|
void |
insertRow(int rownum,
boolean shiftrows)
Insert a blank row into the worksheet.
|
void |
insertRow(int rownum,
int copyrow,
int flag,
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
|
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 |
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 |
setCopyFormatsFromPriorWhenAdding(boolean f)
When adding a new Cell to the sheet, OpenXLS can
automatically copy the formatting from the Cell directly
above the inserted Cell.
|
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 |
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 |
setProtected(boolean b) |
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 |
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.
|
String |
toString()
Returns the name of this Sheet.
|
static final int ROW_KEEP
static final int ROW_INSERT
WorkBook getWorkBook()
Mergedcells getMergedCellsRec()
void addChart(byte[] serialchart,
String name)
int getFirstRow()
int getFirstCol()
int getLastRow()
int getLastCol()
void setProtected(boolean b)
void setVeryHidden(boolean b)
boolean - b hidden stateboolean getSelected()
boolean getHidden()
void setHidden(boolean b)
boolean - b hidden statevoid setFirstVisibleTab()
int getTabIndex()
void setTabIndex(int idx)
int - idx the new index of the sheet tabvoid setSelected(boolean b)
boolean - b selected valueColHandle getCol(int clnum) throws ColumnNotFoundException
ColumnNotFoundExceptionColHandle getCol(String name) throws ColumnNotFoundException
ColumnNotFoundExceptionColHandle[] getColumns()
List<?> getColNames()
List<?> getRowNums()
RowHandle getRow(int t) throws RowNotFoundException
int - row number to returnRowNotFoundExceptionRowHandle[] getRows()
int getNumRows()
int getNumCols()
void removeCell(CellHandle celldel)
CellHandle - to removevoid removeCell(String celladdr)
String - celladdr - the Address of the Cell to removevoid removeRow(int rownum)
throws RowNotFoundException
int - rownum - the number of the row to removeRowNotFoundExceptionvoid removeRow(int rownum,
boolean shiftrows)
throws RowNotFoundException
int - rownum - the number of the row to removeboolean - shiftrows - true will shift all lower rows up one.RowNotFoundExceptionvoid removeCol(String colstr) throws ColumnNotFoundException
String - colstr - the name of the column to removeColumnNotFoundExceptionvoid removeCol(String colstr, boolean shiftcols) throws ColumnNotFoundException
String - colstr - the name of the column to removeboolean - shiftcols - true will shift following colsColumnNotFoundExceptionSheet getSheet()
String getSheetName()
byte[] getSerialBytes()
WorkBook.addWorkSheet(byte[] serialsheet, String NewSheetName)void setVal(String address, Object val) throws CellNotFoundException, CellTypeMismatchException
String - Cell Address (ie: "D14")Object - new Cell Object valueCellNotFoundException - is thrown if there is
no existing Cell at the specified address.CellTypeMismatchExceptionvoid setVal(String address, double d) throws CellNotFoundException, CellTypeMismatchException
String - Cell Address (ie: "D14")double - new Cell double valueaddress - d - CellNotFoundException - is
thrown if there is no existing Cell at the specified address.CellTypeMismatchExceptionvoid setVal(String address, String s) throws CellNotFoundException, CellTypeMismatchException
String - Cell Address (ie: "D14")String - new Cell String valueCellNotFoundException - is thrown if there is no existing Cell at the specified address.CellTypeMismatchExceptionvoid setSheetName(String name)
String - the new name for the Worksheetvoid setVal(String address, int i) throws CellNotFoundException, CellTypeMismatchException
String - Cell Address (ie: "D14")int - new Cell int valueCellNotFoundException - is thrown if there is no existing Cell at the specified address.CellTypeMismatchExceptionObject getVal(String address) throws CellNotFoundException
CellNotFoundException - is thrown if there is
no existing Cell at the specified address.void insertRow(int rownum)
rownum - the rownumber to insertvoid insertRow(int rownum,
boolean shiftrows)
rownum - the rownumber to insertwhether - to shift down existing Cellsvoid insertRow(int rownum,
int copyrow,
int flag,
boolean shiftrows)
rownum - the rownumber to insertwhether - to shift down existing Cellsvoid insertCol(String colnum)
colstr - the Column string to insertvoid setCopyFormatsFromPriorWhenAdding(boolean f)
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 CellCellHandle add(Object obj, String address)
obj - the value of the new Celladdress - the address of the new CellCellHandle add(Date dt, String address, 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 Cellvoid remove()
CellHandle[] getCells()
FormulaHandle getFormula(String addr) throws FormulaNotFoundException, CellNotFoundException
addr - the address of the CellFormulaNotFoundException - is thrown if there is no existing formula at the specified address.CellNotFoundExceptionCellHandle getCell(String addr) throws CellNotFoundException
addr - the address of the CellCellNotFoundException - is thrown if there is no existing Cell at the specified address.CellHandle getCell(int row, int col) throws CellNotFoundException
int - Row the integer row of the Cellint - Col the integer col of the CellCellNotFoundException - is thrown if there is no existing Cell at the specified address.void moveCell(CellHandle c, String addr) throws CellPositionConflictException
CellHandle - c - the cell to be movedString - celladdr - the destination address of the cellCellPositionConflictExceptionString getFooterText()
String getHeaderText()
void setHeaderText(String t)
String - header textvoid setFooterText(String t)
String - footer textString toString()
toString in class ObjectObject.toString()Copyright © 2002–2019 Starter Inc.. All rights reserved.