com.extentech.ExtenXLS
Interface WorkBook

All Superinterfaces:
Document, Handle
All Known Implementing Classes:
EncryptedWorkBookHandle, MemeWorkBook, WebWorkBook, WorkBookHandle, WorkBookParser

Deprecated. This interface does not provide any useful abstraction. In practice it is equivalent to the WorkBookHandle class. Use that type instead.

public interface WorkBook
extends Handle, Document

An interface representing an ExtenXLS WorkBook.


Field Summary
static int ALLOWDUPES
          Deprecated.  
static String CALC_MODE_PROP
          Deprecated.  
static int CALCULATE_ALWAYS
          Deprecated.  
static int CALCULATE_AUTO
          Deprecated.  
static int CALCULATE_EXPLICIT
          Deprecated.  
static String REFTRACK_PROP
          Deprecated.  
static int SHAREDUPES
          Deprecated.  
static int STRING_ENCODING_AUTO
          Deprecated.  
static int STRING_ENCODING_COMPRESSED
          Deprecated.  
static int STRING_ENCODING_UNICODE
          Deprecated.  
 
Fields inherited from interface com.extentech.ExtenXLS.Document
DEBUG_HIGH, DEBUG_LOW, DEBUG_MEDIUM
 
Method Summary
 void addProperty(String name, Object val)
          Deprecated. add non-Excel property
 boolean addSheetFromWorkBook(WorkBookHandle sourceBook, String sourceSheetName, String destSheetName)
          Deprecated.  
 WorkSheetHandle addWorkSheet(WorkSheetHandle sht, String NewSheetName)
          Deprecated. Inserts a new worksheet and places it at the end of the workbook
 void calculateFormulas()
          Deprecated. Iterate through the formulas in this WorkBook and call the calculate method on each.
 void copyChartToSheet(ChartHandle chart, WorkSheetHandle sheet)
          Deprecated. Copies an existing Chart to another WorkSheet
 void copyChartToSheet(String chartname, String sheetname)
          Deprecated. Copies an existing Chart to another WorkSheet
 WorkSheetHandle copyWorkSheet(String SourceSheetName, String NewSheetName)
          Deprecated. Copy (duplicate) a worksheet in the workbook and add it to the end of the workbook with a new name
 WorkSheetHandle createWorkSheet(String name)
          Deprecated. Creates a new worksheet and places it at the end of the workbook
 byte[] getBytes()
          Deprecated. 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)
          Deprecated. Returns the Cell at the specified Location
 CellHandle[] getCells()
          Deprecated. Returns all of the Cells contained in the WorkBook
 ChartHandle getChart(String chartname)
          Deprecated. Returns a Chart Handle
 ChartHandle[] getCharts()
          Deprecated. Returns all Chart Handles contained in the WorkBook
 FormatHandle[] getFormats()
          Deprecated. Returns an Array of all the FormatHandles present in the workbook
 int getFormulaCalculationMode()
          Deprecated.  
 String getName()
          Deprecated. Returns the name of this WorkBook
 NameHandle getNamedRange(String rangename)
          Deprecated. Returns a Named Range Handle
 NameHandle[] getNamedRanges()
          Deprecated. Returns all Named Range Handles
 WorkBookHandle getNoSheetWorkBook()
          Deprecated. Returns a WorkBookHandle containing an empty version of this WorkBook.
 int getNumCells()
          Deprecated. Returns the number of Cells in this WorkBook
 PivotTableHandle getPivotTable(String ptname)
          Deprecated. get a handle to a PivotTable in the WorkBook
 PivotTableHandle[] getPivotTables()
          Deprecated. get an array of handles to all PivotTables in the WorkBook
 Object getProperty(String name)
          Deprecated. get a non-Excel property
 com.extentech.formats.XLS.WorkBook getWorkBook()
          Deprecated. Returns a low-level WorkBook.
 WorkSheetHandle getWorkSheet(int i)
          Deprecated. returns the handle to a WorkSheet by name.
 WorkSheetHandle getWorkSheet(String handstr)
          Deprecated. returns the handle to a WorkSheet by name.
 WorkSheetHandle[] getWorkSheets()
          Deprecated. Returns an array of handles to all of the WorkSheets in the Workbook.
 void removeAllWorkSheets()
          Deprecated. Removes all of the WorkSheets from this WorkBook.
 void reset()
          Deprecated. Clears all values in a template WorkBook.
 void setDebugLevel(int l)
          Deprecated. Set the Debugging level.
 void setDefaultColWidth(int t)
          Deprecated. set Default col width Note: only affects undefined Columns containing Cells
 void setDefaultRowHeight(int t)
          Deprecated. set Default row height Note: only affects undefined Rows containing Cells
 void setDupeStringMode(int mode)
          Deprecated. Set Duplicate String Handling Mode.
 void setFormulaCalculationMode(int mode)
          Deprecated. Explicit calcing of formulas
 void setName(String nm)
          Deprecated. Sets the internal name of this WorkBookHandle.
 void setProtected(boolean b)
          Deprecated. 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)
          Deprecated. Set Encoding mode of new Strings added to file.
 String toString()
          Deprecated. Returns the name of this Sheet.
 StringBuffer writeBytes(OutputStream bbout)
          Deprecated.  
 

Field Detail

CALCULATE_ALWAYS

static final int CALCULATE_ALWAYS
Deprecated. 
See Also:
Constant Field Values

CALCULATE_EXPLICIT

static final int CALCULATE_EXPLICIT
Deprecated. 
See Also:
Constant Field Values

CALCULATE_AUTO

static final int CALCULATE_AUTO
Deprecated. 
See Also:
Constant Field Values

CALC_MODE_PROP

static final String CALC_MODE_PROP
Deprecated. 
See Also:
Constant Field Values

REFTRACK_PROP

static final String REFTRACK_PROP
Deprecated. 
See Also:
Constant Field Values

STRING_ENCODING_AUTO

static final int STRING_ENCODING_AUTO
Deprecated. 
See Also:
Constant Field Values

STRING_ENCODING_UNICODE

static final int STRING_ENCODING_UNICODE
Deprecated. 
See Also:
Constant Field Values

STRING_ENCODING_COMPRESSED

static final int STRING_ENCODING_COMPRESSED
Deprecated. 
See Also:
Constant Field Values

ALLOWDUPES

static final int ALLOWDUPES
Deprecated. 
See Also:
Constant Field Values

SHAREDUPES

static final int SHAREDUPES
Deprecated. 
See Also:
Constant Field Values
Method Detail

setFormulaCalculationMode

void setFormulaCalculationMode(int mode)
Deprecated. 
Explicit calcing of formulas

Parameters:
mode -

getFormulaCalculationMode

int getFormulaCalculationMode()
Deprecated. 

getProperty

Object getProperty(String name)
Deprecated. 
get a non-Excel property

Specified by:
getProperty in interface Document
Returns:
Returns the properties.

addProperty

void addProperty(String name,
                 Object val)
Deprecated. 
add non-Excel property

Specified by:
addProperty in interface Document
Parameters:
properties - The properties to set.

getCells

CellHandle[] getCells()
Deprecated. 
Returns all of the Cells contained in the WorkBook


getCell

CellHandle getCell(String address)
                   throws com.extentech.formats.XLS.CellNotFoundException,
                          com.extentech.formats.XLS.WorkSheetNotFoundException
Deprecated. 
Returns the Cell at the specified Location

Parameters:
address -
Returns:
Throws:
com.extentech.formats.XLS.CellNotFoundException
com.extentech.formats.XLS.WorkSheetNotFoundException

getFormats

FormatHandle[] getFormats()
Deprecated. 
Returns an Array of all the FormatHandles present in the workbook

Returns:
all existing FormatHandles in the workbook

getPivotTable

PivotTableHandle getPivotTable(String ptname)
                               throws com.extentech.formats.XLS.PivotTableNotFoundException
Deprecated. 
get a handle to a PivotTable in the WorkBook

Parameters:
String - name of the PivotTable
Returns:
PivotTable the PivotTable
Throws:
com.extentech.formats.XLS.PivotTableNotFoundException

getPivotTables

PivotTableHandle[] getPivotTables()
                                  throws com.extentech.formats.XLS.PivotTableNotFoundException
Deprecated. 
get an array of handles to all PivotTables in the WorkBook

Returns:
PivotTable[] all of the WorkBooks PivotTables
Throws:
com.extentech.formats.XLS.PivotTableNotFoundException

setProtected

void setProtected(boolean b)
Deprecated. 
set the workbook to protected mode Note: the password cannot be decrypted or changed in Excel -- protection can only be set/removed using ExtenXLS

Parameters:
int - Default Column width

setDefaultRowHeight

void setDefaultRowHeight(int t)
Deprecated. 
set Default row height Note: only affects undefined Rows containing Cells

Parameters:
int - Default Row Height

setDefaultColWidth

void setDefaultColWidth(int t)
Deprecated. 
set Default col width Note: only affects undefined Columns containing Cells

Parameters:
int - Default Column width

setName

void setName(String nm)
Deprecated. 
Sets the internal name of this WorkBookHandle. Overrides the default for 'getName()' which returns the file name source of this WorkBook by default.

Specified by:
setName in interface Document
Parameters:
WorkBook - Name

setDebugLevel

void setDebugLevel(int l)
Deprecated. 
Set the Debugging level. Higher values output more debugging info during execution.

Specified by:
setDebugLevel in interface Document

getNamedRange

NameHandle getNamedRange(String rangename)
                         throws com.extentech.formats.XLS.CellNotFoundException
Deprecated. 
Returns a Named Range Handle

Returns:
NameHandle a Named range in the WorkBook
Throws:
com.extentech.formats.XLS.CellNotFoundException

getChart

ChartHandle getChart(String chartname)
                     throws com.extentech.formats.XLS.ChartNotFoundException
Deprecated. 
Returns a Chart Handle

Returns:
ChartHandle a Chart in the WorkBook
Throws:
com.extentech.formats.XLS.ChartNotFoundException

getCharts

ChartHandle[] getCharts()
Deprecated. 
Returns all Chart Handles contained in the WorkBook

Returns:
ChartHandle[] an array of all Charts in the WorkBook

getNamedRanges

NameHandle[] getNamedRanges()
Deprecated. 
Returns all Named Range Handles

Returns:
NameHandle[] all of the Named ranges in the WorkBook

getName

String getName()
Deprecated. 
Returns the name of this WorkBook

Specified by:
getName in interface Document
Returns:
String name of WorkBook

getNumCells

int getNumCells()
Deprecated. 
Returns the number of Cells in this WorkBook

Returns:
int number of Cells

getBytes

byte[] getBytes()
Deprecated. 
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.

Returns:
byte[] the XLS File's bytes

getWorkSheets

WorkSheetHandle[] getWorkSheets()
Deprecated. 
Returns an array of handles to all of the WorkSheets in the Workbook.

Returns:
WorkSheetHandle[] Array of all WorkSheets in WorkBook

getWorkSheet

WorkSheetHandle getWorkSheet(int i)
                             throws com.extentech.formats.XLS.WorkSheetNotFoundException
Deprecated. 
returns the handle to a WorkSheet by name.

Parameters:
index - of worksheet (ie: 0)
Returns:
WorkSheetHandle the WorkSheet
Throws:
com.extentech.formats.XLS.WorkSheetNotFoundException - if the specified WorkSheet is not found in the WorkBook.

getWorkSheet

WorkSheetHandle getWorkSheet(String handstr)
                             throws com.extentech.formats.XLS.WorkSheetNotFoundException
Deprecated. 
returns the handle to a WorkSheet by name.

Parameters:
String - name of worksheet (ie: "Sheet1")
Returns:
WorkSheetHandle the WorkSheet
Throws:
com.extentech.formats.XLS.WorkSheetNotFoundException - if the specified WorkSheet is not found in the WorkBook.

getWorkBook

com.extentech.formats.XLS.WorkBook getWorkBook()
Deprecated. 
Returns a low-level WorkBook. NOTE: The WorkBook class is NOT a part of the published API. Any of the methods and/or variables on a WorkBook object are subject to change without notice in new versions of ExtenXLS.


reset

void reset()
Deprecated. 
Clears all values in a template WorkBook. Use this method to 'reset' the values of your WorkBook in memory to defaults. For example, if you load a Servlet with a single WorkBookHandle instance, then modify values and stream to a Client system, yo should call 'clearAll()' when the request is completed to remove the modified values and set them back to a default.

Specified by:
reset in interface Document

setStringEncodingMode

void setStringEncodingMode(int mode)
Deprecated. 
Set Encoding mode of new Strings added to file. ExtenXLS has 3 modes for handling the internal encoding of String data that is added to the file. ExtenXLS can save space in the file if it knows that all characters in your String data can be represented with a single byte (Compressed.) If your String contains characters which need 2 bytes to represent (such as Eastern-language characters) then it needs to be stored in an uncompressed Unicode format. ExtenXLS can either automatically detect the mode for each String, or you can set it explicitly. The auto mode is the most flexible but requires processing overhead. Default mode is WorkBookHandle.STRING_ENCODING_AUTO. Valid Modes Are: WorkBookHandle.STRING_ENCODING_AUTO Use if you are adding mixed Unicode and non-unicode Strings and can accept the performance hit -slowest String adds -optimal file size for mixed Strings WorkBookHandle.STRING_ENCODING_UNICODE Use if all of your new Strings are Unicode - faster than AUTO -faster than AUTO -largest file size WorkBookHandle.STRING_ENCODING_COMPRESSED Use if all of your new Strings are non-Unicode and can have high-bytes compressed -faster than AUTO -smallest file size

Parameters:
int - String Encoding Mode

setDupeStringMode

void setDupeStringMode(int mode)
Deprecated. 
Set Duplicate String Handling Mode. The Duplicate String Mode determines the behavior of the String table when inserting new Strings. The String table shares a single entry for multiple Cells containing the same string. When multiple Cells have the same value, they share the same underlying string. Changing the value of any one of the Cells will change the value for any Cells sharing that reference. For this reason, you need to determine the handling of new strings added to the sheet that are duplicates of strings already in the table. If you will be changing the values of these new Cells, you will need to set the Duplicate String Mode to ALLOWDUPES. If the string table encounters a duplicate entry being added, it will insert a duplicate that can then be subsequently changed without affecting the other duplicate Cells. Valid Modes Are: WorkBookHandle.ALLOWDUPES - faster, smaller file sizes, dupe Cells share changes WorkBookHandle.SHAREDUPES - slower inserts, changing Cells has no effect on dupe Cells

Parameters:
int - Duplicate String Handling Mode

copyChartToSheet

void copyChartToSheet(String chartname,
                      String sheetname)
                      throws com.extentech.formats.XLS.ChartNotFoundException,
                             com.extentech.formats.XLS.WorkSheetNotFoundException
Deprecated. 
Copies an existing Chart to another WorkSheet

Parameters:
chartname -
sheetname -
Throws:
com.extentech.formats.XLS.ChartNotFoundException
com.extentech.formats.XLS.WorkSheetNotFoundException

copyChartToSheet

void copyChartToSheet(ChartHandle chart,
                      WorkSheetHandle sheet)
                      throws com.extentech.formats.XLS.ChartNotFoundException,
                             com.extentech.formats.XLS.WorkSheetNotFoundException
Deprecated. 
Copies an existing Chart to another WorkSheet

Parameters:
chart -
sheet -
Throws:
com.extentech.formats.XLS.ChartNotFoundException
com.extentech.formats.XLS.WorkSheetNotFoundException

copyWorkSheet

WorkSheetHandle copyWorkSheet(String SourceSheetName,
                              String NewSheetName)
                              throws com.extentech.formats.XLS.WorkSheetNotFoundException
Deprecated. 
Copy (duplicate) a worksheet in the workbook and add it to the end of the workbook with a new name

Parameters:
String - the Name of the source worksheet;
String - the Name of the new (destination) worksheet;
Returns:
the new WorkSheetHandle
Throws:
com.extentech.formats.XLS.WorkSheetNotFoundException

calculateFormulas

void calculateFormulas()
                       throws com.extentech.formats.XLS.FunctionNotSupportedException
Deprecated. 
Iterate through the formulas in this WorkBook and call the calculate method on each. May be more expensive than calling update on individual FormulaHandles depending on extent of data changes to your WorkBook, or calling update on only the 'top-level' formula in a calculation. When a formula references a Cell containing another formula, it will recursively calculate until it reaches non-formula Cells. Thus, calling this method may calculate formula Cells in a heirarchy more than once.

Throws:
com.extentech.formats.XLS.FunctionNotSupportedException

removeAllWorkSheets

void removeAllWorkSheets()
Deprecated. 
Removes all of the WorkSheets from this WorkBook. Bytes streamed from this WorkBook will create invalid Spreadsheet files unless a WorkSheet(s) are added to it.


getNoSheetWorkBook

WorkBookHandle getNoSheetWorkBook()
Deprecated. 
Returns a WorkBookHandle containing an empty version of this WorkBook. Use in conjunction with addSheetFromWorkBook() to create new output WorkBooks containing various sheets from a master template. ie: WorkBookHandle emptytemplate = this.getNoSheetWorkBook(); emptytemplate.addSheetFromWorkBook(this, "Sheet1", "TargetSheet");

Returns:
WorkBookHandle - the empty WorkBookHandle duplicate
See Also:
addSheetFromWorkBook

addSheetFromWorkBook

boolean addSheetFromWorkBook(WorkBookHandle sourceBook,
                             String sourceSheetName,
                             String destSheetName)
Deprecated. 

Inserts a worksheet from a Source WorkBook.

Parameters:
sourceBook - - the WorkBook containing the sheet to copy
sourceSheetName - - the name of the sheet to copy
destSheetName - - the name of the new sheet in this workbook

addWorkSheet

WorkSheetHandle addWorkSheet(WorkSheetHandle sht,
                             String NewSheetName)
Deprecated. 
Inserts a new worksheet and places it at the end of the workbook

Parameters:
WorkSheetHandle - the source WorkSheetHandle;
String - the Name of the new (destination) worksheet;

createWorkSheet

WorkSheetHandle createWorkSheet(String name)
Deprecated. 
Creates a new worksheet and places it at the end of the workbook

Parameters:
String - the Name of the newly created worksheet
Returns:
the new WorkSheetHandle

toString

String toString()
Deprecated. 
Returns the name of this Sheet.

Overrides:
toString in class Object
See Also:
Object.toString()

writeBytes

StringBuffer writeBytes(OutputStream bbout)
Deprecated. 


Copyright © 2011 Extentech Inc. All Rights Reserved.