|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface WorkBook
An interface representing an ExtenXLS WorkBook.
WorkBookHandle| Field Summary | |
|---|---|
static int |
ALLOWDUPES
|
static int |
CALCULATE_ALWAYS
|
static int |
CALCULATE_AUTO
|
static int |
CALCULATE_EXPLICIT
|
static int |
DEBUG_HIGH
|
static int |
DEBUG_LOW
|
static int |
DEBUG_MEDIUM
|
static int |
SHAREDUPES
|
static int |
STRING_ENCODING_AUTO
|
static int |
STRING_ENCODING_COMPRESSED
|
static int |
STRING_ENCODING_UNICODE
|
| Method Summary | |
|---|---|
void |
addProperty(String name,
Object val)
add non-Excel property |
boolean |
addSheetFromWorkBook(WorkBookHandle sourceBook,
String sourceSheetName,
String destSheetName)
Deprecated. |
WorkSheetHandle |
addWorkSheet(WorkSheetHandle sht,
String NewSheetName)
Inserts a new worksheet and places it at the end of the workbook |
void |
calculateFormulas()
Iterate through the formulas in this WorkBook and call the calculate method on each. |
void |
copyChartToSheet(ChartHandle chart,
WorkSheetHandle sheet)
Copies an existing Chart to another WorkSheet |
void |
copyChartToSheet(String chartname,
String sheetname)
Copies an existing Chart to another WorkSheet |
WorkSheetHandle |
copyWorkSheet(String SourceSheetName,
String NewSheetName)
Copy (duplicate) a worksheet in the workbook and add it to the end of the workbook with a new name |
WorkSheetHandle |
createWorkSheet(String name)
Creates a new worksheet and places it at the end of the workbook |
byte[] |
getBytes()
Returns a byte Array containing the valid file containing this WorkBook and associated Storages (such as VB files and PivotTables.) This is the actual file data and that can be read from and written to FileOutputStreams and ServletOutputStreams. |
CellHandle |
getCell(String address)
Returns the Cell at the specified Location |
CellHandle[] |
getCells()
Returns all of the Cells contained in the WorkBook |
ChartHandle |
getChart(String chartname)
Returns a Chart Handle |
ChartHandle[] |
getCharts()
Returns all Chart Handles contained in the WorkBook |
FormatHandle[] |
getFormats()
Returns an Array of all the FormatHandles present in the workbook |
int |
getFormulaCalculationMode()
|
String |
getName()
Returns the name of this WorkBook |
NameHandle |
getNamedRange(String rangename)
Returns a Named Range Handle |
NameHandle[] |
getNamedRanges()
Returns all Named Range Handles |
WorkBookHandle |
getNoSheetWorkBook()
Returns a WorkBookHandle containing an empty version of this WorkBook. |
int |
getNumCells()
Returns the number of Cells in this WorkBook |
PivotTableHandle |
getPivotTable(String ptname)
get a handle to a PivotTable in the WorkBook |
PivotTableHandle[] |
getPivotTables()
get an array of handles to all PivotTables in the WorkBook |
Object |
getProperty(String name)
get a non-Excel property |
com.extentech.formats.XLS.WorkBook |
getWorkBook()
Returns a low-level WorkBook. |
String |
getWorkingDirectory()
Returns the directory containing the ExtenXLS.jar and extenxls.lic files. |
WorkSheetHandle |
getWorkSheet(int i)
returns the handle to a WorkSheet by name. |
WorkSheetHandle |
getWorkSheet(String handstr)
returns the handle to a WorkSheet by name. |
WorkSheetHandle[] |
getWorkSheets()
Returns an array of handles to all of the WorkSheets in the Workbook. |
void |
removeAllWorkSheets()
Removes all of the WorkSheets from this WorkBook. |
void |
reset()
Clears all values in a template WorkBook. |
void |
setDebugLevel(int l)
Set the Debugging level. |
void |
setDefaultColWidth(int t)
set Default col width Note: only affects undefined Columns containing Cells |
void |
setDefaultRowHeight(int t)
set Default row height Note: only affects undefined Rows containing Cells |
void |
setDupeStringMode(int mode)
Set Duplicate String Handling Mode. |
void |
setFormulaCalculationMode(int mode)
Explicit calcing of formulas |
void |
setName(String nm)
Sets the internal name of this WorkBookHandle. |
void |
setProtected(boolean b)
set the workbook to protected mode Note: the password cannot be decrypted or changed in Excel -- protection can only be set/removed using ExtenXLS |
void |
setStringEncodingMode(int mode)
Set Encoding mode of new Strings added to file. |
String |
toString()
Returns the name of this Sheet. |
StringBuffer |
writeBytes(OutputStream bbout)
|
| Field Detail |
|---|
static final int CALCULATE_ALWAYS
static final int CALCULATE_EXPLICIT
static final int CALCULATE_AUTO
static final int STRING_ENCODING_AUTO
static final int STRING_ENCODING_UNICODE
static final int STRING_ENCODING_COMPRESSED
static final int ALLOWDUPES
static final int SHAREDUPES
static final int DEBUG_LOW
static final int DEBUG_MEDIUM
static final int DEBUG_HIGH
| Method Detail |
|---|
void setFormulaCalculationMode(int mode)
mode - int getFormulaCalculationMode()
Object getProperty(String name)
getProperty in interface Document
void addProperty(String name,
Object val)
addProperty in interface Documentproperties - The properties to set.CellHandle[] getCells()
CellHandle getCell(String address)
throws com.extentech.formats.XLS.CellNotFoundException,
com.extentech.formats.XLS.WorkSheetNotFoundException
address -
com.extentech.formats.XLS.CellNotFoundException
com.extentech.formats.XLS.WorkSheetNotFoundExceptionFormatHandle[] getFormats()
getFormats in interface Document
PivotTableHandle getPivotTable(String ptname)
throws com.extentech.formats.XLS.PivotTableNotFoundException
String - name of the PivotTable
com.extentech.formats.XLS.PivotTableNotFoundException
PivotTableHandle[] getPivotTables()
throws com.extentech.formats.XLS.PivotTableNotFoundException
com.extentech.formats.XLS.PivotTableNotFoundExceptionvoid setProtected(boolean b)
setProtected in interface Documentint - Default Column widthvoid setDefaultRowHeight(int t)
int - Default Row Heightvoid setDefaultColWidth(int t)
int - Default Column widthvoid setName(String nm)
setName in interface DocumentWorkBook - Namevoid setDebugLevel(int l)
setDebugLevel in interface Document
NameHandle getNamedRange(String rangename)
throws com.extentech.formats.XLS.CellNotFoundException
com.extentech.formats.XLS.CellNotFoundException
ChartHandle getChart(String chartname)
throws com.extentech.formats.XLS.ChartNotFoundException
getChart in interface Documentcom.extentech.formats.XLS.ChartNotFoundExceptionChartHandle[] getCharts()
getCharts in interface DocumentNameHandle[] getNamedRanges()
String getName()
getName in interface Documentint getNumCells()
byte[] getBytes()
getBytes in interface DocumentString getWorkingDirectory()
getWorkingDirectory in interface DocumentWorkSheetHandle[] getWorkSheets()
WorkSheetHandle getWorkSheet(int i)
throws com.extentech.formats.XLS.WorkSheetNotFoundException
index - of worksheet (ie: 0)
com.extentech.formats.XLS.WorkSheetNotFoundException - if the specified WorkSheet is
not found in the WorkBook.
WorkSheetHandle getWorkSheet(String handstr)
throws com.extentech.formats.XLS.WorkSheetNotFoundException
String - name of worksheet (ie: "Sheet1")
com.extentech.formats.XLS.WorkSheetNotFoundException - if the specified WorkSheet is
not found in the WorkBook.com.extentech.formats.XLS.WorkBook getWorkBook()
void reset()
reset in interface Documentvoid setStringEncodingMode(int mode)
setStringEncodingMode in interface Documentint - String Encoding Modevoid setDupeStringMode(int mode)
setDupeStringMode in interface Documentint - Duplicate String Handling Mode
void copyChartToSheet(String chartname,
String sheetname)
throws com.extentech.formats.XLS.ChartNotFoundException,
com.extentech.formats.XLS.WorkSheetNotFoundException
chartname - sheetname -
com.extentech.formats.XLS.ChartNotFoundException
com.extentech.formats.XLS.WorkSheetNotFoundException
void copyChartToSheet(ChartHandle chart,
WorkSheetHandle sheet)
throws com.extentech.formats.XLS.ChartNotFoundException,
com.extentech.formats.XLS.WorkSheetNotFoundException
chart - sheet -
com.extentech.formats.XLS.ChartNotFoundException
com.extentech.formats.XLS.WorkSheetNotFoundException
WorkSheetHandle copyWorkSheet(String SourceSheetName,
String NewSheetName)
throws com.extentech.formats.XLS.WorkSheetNotFoundException
String - the Name of the source worksheet;String - the Name of the new (destination) worksheet;
com.extentech.formats.XLS.WorkSheetNotFoundException
void calculateFormulas()
throws com.extentech.formats.XLS.FunctionNotSupportedException
com.extentech.formats.XLS.FunctionNotSupportedExceptionvoid removeAllWorkSheets()
WorkBookHandle getNoSheetWorkBook()
addSheetFromWorkBook
boolean addSheetFromWorkBook(WorkBookHandle sourceBook,
String sourceSheetName,
String destSheetName)
sourceBook - - the WorkBook containing the sheet to copysourceSheetName - - the name of the sheet to copydestSheetName - - the name of the new sheet in this workbook
WorkSheetHandle addWorkSheet(WorkSheetHandle sht,
String NewSheetName)
WorkSheetHandle - the source WorkSheetHandle;String - the Name of the new (destination) worksheet;WorkSheetHandle createWorkSheet(String name)
String - the Name of the newly created worksheet
String toString()
toString in interface DocumenttoString in class ObjectObject.toString()StringBuffer writeBytes(OutputStream bbout)
writeBytes in interface Document
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||