com.extentech.ExtenXLS.web
Class MemeWorkBook

java.lang.Object
  extended by com.extentech.ExtenXLS.DocumentHandle
      extended by com.extentech.ExtenDOC.DocHandle
          extended by com.extentech.ExtenXLS.web.MemeDocument
              extended by com.extentech.ExtenXLS.web.MemeWorkBook
All Implemented Interfaces:
Document, Handle, WorkBook, com.extentech.toolkit.LogOutputter
Direct Known Subclasses:
WebWorkBook

public class MemeWorkBook
extends MemeDocument
implements WorkBook, com.extentech.toolkit.LogOutputter

This class provides Saving and Reconstituting WorkBooks as memes in the Extentech KB schema.

Since:
Version:
Author:
John McMahon :: Copyright ©2010 Extentech Inc.
See Also:

Field Summary
 
Fields inherited from class com.extentech.ExtenXLS.web.MemeDocument
ACCESS_STATUS_PRIVATE, ACCESS_STATUS_PUBLIC, ACCESS_STATUS_SHARED
 
Fields inherited from interface com.extentech.ExtenXLS.WorkBook
ALLOWDUPES, CALCULATE_ALWAYS, CALCULATE_AUTO, CALCULATE_EXPLICIT, DEBUG_HIGH, DEBUG_LOW, DEBUG_MEDIUM, SHAREDUPES, STRING_ENCODING_AUTO, STRING_ENCODING_COMPRESSED, STRING_ENCODING_UNICODE
 
Constructor Summary
MemeWorkBook()
          May 16, 2010
MemeWorkBook(byte[] buf)
          May 25, 2010
MemeWorkBook(Connection dbc, byte[] in)
          May 16, 2010
MemeWorkBook(Connection dbcon, File fx)
          May 16, 2010
MemeWorkBook(Connection cx, int mix, boolean storeAsFile, boolean xmlStorage)
          May 16, 2010
MemeWorkBook(String finpath, com.extentech.swingtools.ProgressDialog progdialog)
          May 25, 2010
 
Method Summary
 void addProperty(String name, Object val)
          Sets the value of a property in the workbook property store.
 boolean addSheetFromWorkBook(WorkBookHandle sourceBook, String sourceSheetName, String destSheetName)
          Deprecated.  
 boolean addSheetFromWorkBookWithFormatting(WorkBookHandle sourceBook, String sourceSheetName, String destSheetName)
          Deprecated.  
 WorkSheetHandle addWorkSheet(WorkSheetHandle sourceSheet)
           
 WorkSheetHandle addWorkSheet(WorkSheetHandle sourceSheet, 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 close()
          Closes the WorkBook and releases resources.
 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
 ChartHandle createChart(String name, WorkSheetHandle wsh)
           
 NameHandle createNamedRange(String name, String rangeDef)
           
 WorkSheetHandle createWorkSheet(String name)
          Creates a new worksheet and places it at the end of the workbook
 WorkSheetHandle createWorkSheet(String name, int sheetpos)
           
 void deleteChart(String chartname, WorkSheetHandle wsh)
           
 boolean equals(Object obj)
           
 void finalize()
          Closes the WorkBook and releases resources.
 byte[] getBytes()
          Deprecated.  
 CellHandle getCell(String address)
          Returns the Cell at the specified Location
 CellRange[] getCellRanges()
           
 CellHandle[] getCells()
          Returns all of the Cells contained in the WorkBook
 ChartHandle getChart(String chartname)
          May 15, 2010
 ChartHandle getChartById(int id)
           
 ChartHandle[] getCharts()
          May 15, 2010
 FormatHandle[] getConditionalFormats()
           
 com.extentech.formats.DOC.DocumentFactory getFactory()
          returns a low-level DocumentFactory NOTE: The WorkBook class is NOT a part of the published API.
 FormatHandle[] getFormats()
          May 15, 2010
 int getFormulaCalculationMode()
           
 FormulaHandle getFormulaHandle(String celladdress)
           
 ImageHandle getImage(String imagename)
           
 ImageHandle[] getImages()
           
 boolean getIsExcel2007()
           
 String getName()
          Returns the name of this WorkBook
 NameHandle getNamedRange(String rangename)
          Returns a Named Range Handle
 NameHandle getNamedRangeInScope(String rangename)
           
 NameHandle[] getNamedRanges()
          Returns all Named Range Handles
 NameHandle[] getNamedRangesInScope()
           
 WorkBookHandle getNoSheetWorkBook()
          Returns a WorkBookHandle containing an empty version of this WorkBook.
 int getNumCells()
          Returns the number of Cells in this WorkBook
 int getNumWorkSheets()
           
 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
 Map getProperties()
          Retrieves a Map containing the workbook properties store.
 Object getProperty(String name)
          Retrieves the a property in the workbook property store.
 String getStats()
           
 String getStats(boolean usehtml)
           
 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 sheetnum)
          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.
 String getXLSVersionString()
           
 int hashCode()
           
 boolean is1904()
           
 void removeAllWorkSheets()
          Removes all of the WorkSheets from this WorkBook.
 void reset()
          Resets the values of this WorkBookHandle to defaults.
 int searchAndReplace(String searchfor, String replacewith)
          Searches all Cel ls in the workbook for the string occurrence and replaces with the replacement text.
 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)
          May 15, 2010
 void setFormulaCalculationMode(int CalcMode)
          Explicit calcing of formulas
 void setName(String nm)
          Sets the internal name of this WorkBookHandle.
 void setProperties(Map properties)
          Replaces the workbook properties store with the given Map.
 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.
 void write(OutputStream out)
          Saves the WorkBookHandle to this opened OutputStream If original file is Excel2007 Format, the template will be written in Excel 2007 (XLSX) Format.
 void write(OutputStream out, boolean Excel2007Format)
           
 void write(String fname)
          Saves this WorkBookHandle to filename and path fname if the filename ends with ".xlsx" or ".xlsm", the template will be written in Excel 2007 (XLSX) Format.
 void write(String fname, boolean Excel2007Format)
          saves this WorkBookHandle to filename and path fname if Excel2007 Format, the template will be written in Excel 2007 (XLSX) Format.
 StringBuffer writeBytes(OutputStream bout)
           
 void writeXLSXBytes(OutputStream bout)
           
 
Methods inherited from class com.extentech.ExtenXLS.web.MemeDocument
addUser, appendOutputDir, bindData, createPage, deleteBook, deleteDoc, getAllDiffs, getBook, getConcurrentUsers, getConnection, getCryptPass, getDataFactory, getDatamapping, getDefaultFileString, getDescription, getFileName, getLatestDiff, getMemeId, getMemeType, getMessageManager, getNumPages, getOutputDir, getOwnerId, getPages, getRESTEmit, getRESTlog, getServerURL, getSession, getSharingAccess, getTempfile, getXMLStream, isPublic, isSaved, loadDataDefinition, loadDataDefinition, log, log, log, main, revert, save, setConnection, setCryptPass, setDataFactory, setDatamapping, setDescription, setMemeId, setMemeType, setMessageManager, setOutputDir, setOwnerId, setRESTlog, setSaved, setServerURL, setSession, setSharingAccess, setStoreAsXML, setStoreBookAsFile, setTempfile, storeAsXML, storeBookAsFile, storeDiff, storeNewDocument
 
Methods inherited from class com.extentech.ExtenDOC.DocHandle
getAllText, getFormatHandles, getPage, getParagraphs, getTextRangeHandles, getVersion, getXHTML, setFileName, setXHTML
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.extentech.toolkit.LogOutputter
log, log, log
 

Constructor Detail

MemeWorkBook

public MemeWorkBook(Connection cx,
                    int mix,
                    boolean storeAsFile,
                    boolean xmlStorage)
May 16, 2010

Parameters:
cx -
mix -
storeAsFile -
xmlStorage -

MemeWorkBook

public MemeWorkBook()
May 16, 2010


MemeWorkBook

public MemeWorkBook(Connection dbc,
                    byte[] in)
May 16, 2010

Parameters:
dbc -
in -

MemeWorkBook

public MemeWorkBook(Connection dbcon,
                    File fx)
May 16, 2010

Parameters:
dbcon -
fx -

MemeWorkBook

public MemeWorkBook(byte[] buf)
May 25, 2010

Parameters:
buf -

MemeWorkBook

public MemeWorkBook(String finpath,
                    com.extentech.swingtools.ProgressDialog progdialog)
May 25, 2010

Parameters:
finpath -
progdialog -
Method Detail

addProperty

public void addProperty(String name,
                        Object val)
Description copied from class: com.extentech.ExtenDOC.DocHandle
Sets the value of a property in the workbook property store. This is not an Excel-compatible feature.

Specified by:
addProperty in interface Document
Specified by:
addProperty in interface WorkBook
Overrides:
addProperty in class com.extentech.ExtenDOC.DocHandle
Parameters:
name -
val -
See Also:
DocumentHandle.addProperty(java.lang.String, java.lang.Object)

addSheetFromWorkBook

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

Description copied from interface: WorkBook
Inserts a worksheet from a Source WorkBook.

Specified by:
addSheetFromWorkBook in interface WorkBook
Parameters:
sourceBook -
sourceSheetName -
destSheetName -
Returns:
See Also:
WorkBookHandle.addSheetFromWorkBook(com.extentech.ExtenXLS.WorkBookHandle, java.lang.String, java.lang.String)

addSheetFromWorkBookWithFormatting

public boolean addSheetFromWorkBookWithFormatting(WorkBookHandle sourceBook,
                                                  String sourceSheetName,
                                                  String destSheetName)
Deprecated. 

Parameters:
sourceBook -
sourceSheetName -
destSheetName -
Returns:
See Also:
WorkBookHandle.addSheetFromWorkBookWithFormatting(com.extentech.ExtenXLS.WorkBookHandle, java.lang.String, java.lang.String)

addWorkSheet

public WorkSheetHandle addWorkSheet(WorkSheetHandle sourceSheet,
                                    String NewSheetName)
Description copied from interface: WorkBook
Inserts a new worksheet and places it at the end of the workbook

Specified by:
addWorkSheet in interface WorkBook
Parameters:
sourceSheet -
NewSheetName -
Returns:
See Also:
WorkBookHandle.addWorkSheet(com.extentech.ExtenXLS.WorkSheetHandle, java.lang.String)

addWorkSheet

public WorkSheetHandle addWorkSheet(WorkSheetHandle sourceSheet)
Parameters:
sourceSheet -
Returns:
See Also:
WorkBookHandle.addWorkSheet(com.extentech.ExtenXLS.WorkSheetHandle)

calculateFormulas

public void calculateFormulas()
                       throws com.extentech.formats.XLS.FunctionNotSupportedException
Description copied from interface: WorkBook
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.

Specified by:
calculateFormulas in interface WorkBook
Throws:
com.extentech.formats.XLS.FunctionNotSupportedException
See Also:
WorkBookHandle.calculateFormulas()

close

public void close()
Description copied from class: com.extentech.ExtenDOC.DocHandle
Closes the WorkBook and releases resources.

Overrides:
close in class com.extentech.ExtenDOC.DocHandle
See Also:
DocumentHandle.close()

copyChartToSheet

public void copyChartToSheet(ChartHandle chart,
                             WorkSheetHandle sheet)
                      throws com.extentech.formats.XLS.ChartNotFoundException,
                             com.extentech.formats.XLS.WorkSheetNotFoundException
Description copied from interface: WorkBook
Copies an existing Chart to another WorkSheet

Specified by:
copyChartToSheet in interface WorkBook
Parameters:
chart -
sheet -
Throws:
com.extentech.formats.XLS.ChartNotFoundException
com.extentech.formats.XLS.WorkSheetNotFoundException
See Also:
WorkBookHandle.copyChartToSheet(com.extentech.ExtenXLS.ChartHandle, com.extentech.ExtenXLS.WorkSheetHandle)

copyChartToSheet

public void copyChartToSheet(String chartname,
                             String sheetname)
                      throws com.extentech.formats.XLS.ChartNotFoundException,
                             com.extentech.formats.XLS.WorkSheetNotFoundException
Description copied from interface: WorkBook
Copies an existing Chart to another WorkSheet

Specified by:
copyChartToSheet in interface WorkBook
Parameters:
chartname -
sheetname -
Throws:
com.extentech.formats.XLS.ChartNotFoundException
com.extentech.formats.XLS.WorkSheetNotFoundException
See Also:
WorkBookHandle.copyChartToSheet(java.lang.String, java.lang.String)

copyWorkSheet

public WorkSheetHandle copyWorkSheet(String SourceSheetName,
                                     String NewSheetName)
                              throws com.extentech.formats.XLS.WorkSheetNotFoundException
Description copied from interface: WorkBook
Copy (duplicate) a worksheet in the workbook and add it to the end of the workbook with a new name

Specified by:
copyWorkSheet in interface WorkBook
Parameters:
SourceSheetName -
NewSheetName -
Returns:
Throws:
com.extentech.formats.XLS.WorkSheetNotFoundException
See Also:
WorkBookHandle.copyWorkSheet(java.lang.String, java.lang.String)

createChart

public ChartHandle createChart(String name,
                               WorkSheetHandle wsh)
Parameters:
name -
wsh -
Returns:
See Also:
WorkBookHandle.createChart(java.lang.String, com.extentech.ExtenXLS.WorkSheetHandle)

createNamedRange

public NameHandle createNamedRange(String name,
                                   String rangeDef)
Parameters:
name -
rangeDef -
Returns:
See Also:
WorkBookHandle.createNamedRange(java.lang.String, java.lang.String)

createWorkSheet

public WorkSheetHandle createWorkSheet(String name,
                                       int sheetpos)
Parameters:
name -
sheetpos -
Returns:
See Also:
WorkBookHandle.createWorkSheet(java.lang.String, int)

createWorkSheet

public WorkSheetHandle createWorkSheet(String name)
Description copied from interface: WorkBook
Creates a new worksheet and places it at the end of the workbook

Specified by:
createWorkSheet in interface WorkBook
Parameters:
name -
Returns:
See Also:
WorkBookHandle.createWorkSheet(java.lang.String)

deleteChart

public void deleteChart(String chartname,
                        WorkSheetHandle wsh)
                 throws com.extentech.formats.XLS.ChartNotFoundException
Parameters:
chartname -
wsh -
Throws:
com.extentech.formats.XLS.ChartNotFoundException
See Also:
WorkBookHandle.deleteChart(java.lang.String, com.extentech.ExtenXLS.WorkSheetHandle)

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
Parameters:
obj -
Returns:
See Also:
Object.equals(java.lang.Object)

finalize

public void finalize()
Description copied from class: com.extentech.ExtenDOC.DocHandle
Closes the WorkBook and releases resources.

Overrides:
finalize in class com.extentech.ExtenDOC.DocHandle
See Also:
DocumentHandle.finalize()

getBytes

public byte[] getBytes()
Deprecated. 

Description copied from class: com.extentech.ExtenDOC.DocHandle
Create a byte array containing the binary Document bytes Outputs a Excel 97-2003 (BIFF8) compatible Document This method creates a potentially large byte array and is not suitable for use with large output due to memory usage. Please use writeBytes() with an appropriate OutputStream for best memory performance.

Specified by:
getBytes in interface Document
Specified by:
getBytes in interface WorkBook
Overrides:
getBytes in class com.extentech.ExtenDOC.DocHandle
Returns:
See Also:
WorkBookHandle.getBytes()

getCell

public CellHandle getCell(String address)
                   throws com.extentech.formats.XLS.CellNotFoundException,
                          com.extentech.formats.XLS.WorkSheetNotFoundException
Description copied from interface: WorkBook
Returns the Cell at the specified Location

Specified by:
getCell in interface WorkBook
Parameters:
address -
Returns:
Throws:
com.extentech.formats.XLS.CellNotFoundException
com.extentech.formats.XLS.WorkSheetNotFoundException
See Also:
WorkBookHandle.getCell(java.lang.String)

getCellRanges

public CellRange[] getCellRanges()
Returns:
See Also:
WorkBookHandle.getCellRanges()

getCells

public CellHandle[] getCells()
Description copied from interface: WorkBook
Returns all of the Cells contained in the WorkBook

Specified by:
getCells in interface WorkBook
Returns:
See Also:
WorkBookHandle.getCells()

getChart

public ChartHandle getChart(String chartname)
                     throws com.extentech.formats.XLS.ChartNotFoundException
Description copied from class: com.extentech.ExtenDOC.DocHandle
May 15, 2010

Specified by:
getChart in interface Document
Specified by:
getChart in interface WorkBook
Overrides:
getChart in class com.extentech.ExtenDOC.DocHandle
Parameters:
chartname -
Returns:
Throws:
com.extentech.formats.XLS.ChartNotFoundException
See Also:
WorkBookHandle.getChart(java.lang.String)

getChartById

public ChartHandle getChartById(int id)
                         throws com.extentech.formats.XLS.ChartNotFoundException
Parameters:
id -
Returns:
Throws:
com.extentech.formats.XLS.ChartNotFoundException
See Also:
WorkBookHandle.getChartById(int)

getCharts

public ChartHandle[] getCharts()
Description copied from class: com.extentech.ExtenDOC.DocHandle
May 15, 2010

Specified by:
getCharts in interface Document
Specified by:
getCharts in interface WorkBook
Overrides:
getCharts in class com.extentech.ExtenDOC.DocHandle
Returns:
See Also:
WorkBookHandle.getCharts()

getConditionalFormats

public FormatHandle[] getConditionalFormats()
Returns:
See Also:
WorkBookHandle.getConditionalFormats()

getFactory

public com.extentech.formats.DOC.DocumentFactory getFactory()
Description copied from class: com.extentech.ExtenDOC.DocHandle
returns a low-level DocumentFactory 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.

Overrides:
getFactory in class com.extentech.ExtenDOC.DocHandle
Returns:
See Also:
DocumentHandle.getFactory()

getFormats

public FormatHandle[] getFormats()
Description copied from class: com.extentech.ExtenDOC.DocHandle
May 15, 2010

Specified by:
getFormats in interface Document
Specified by:
getFormats in interface WorkBook
Overrides:
getFormats in class com.extentech.ExtenDOC.DocHandle
Returns:
See Also:
WorkBookHandle.getFormats()

getFormulaCalculationMode

public int getFormulaCalculationMode()
Specified by:
getFormulaCalculationMode in interface WorkBook
Returns:
See Also:
WorkBookHandle.getFormulaCalculationMode()

getFormulaHandle

public FormulaHandle getFormulaHandle(String celladdress)
                               throws com.extentech.formats.XLS.FormulaNotFoundException
Parameters:
celladdress -
Returns:
Throws:
com.extentech.formats.XLS.FormulaNotFoundException
See Also:
WorkBookHandle.getFormulaHandle(java.lang.String)

getImage

public ImageHandle getImage(String imagename)
                     throws com.extentech.formats.XLS.ImageNotFoundException
Parameters:
imagename -
Returns:
Throws:
com.extentech.formats.XLS.ImageNotFoundException
See Also:
WorkBookHandle.getImage(java.lang.String)

getImages

public ImageHandle[] getImages()
Returns:
See Also:
WorkBookHandle.getImages()

getIsExcel2007

public boolean getIsExcel2007()
Returns:
See Also:
WorkBookHandle.getIsExcel2007()

getName

public String getName()
Description copied from class: com.extentech.ExtenDOC.DocHandle
Returns the name of this WorkBook

Specified by:
getName in interface Document
Specified by:
getName in interface WorkBook
Overrides:
getName in class com.extentech.ExtenDOC.DocHandle
Returns:
See Also:
WorkBookHandle.getName()

getNamedRange

public NameHandle getNamedRange(String rangename)
                         throws com.extentech.formats.XLS.CellNotFoundException
Description copied from interface: WorkBook
Returns a Named Range Handle

Specified by:
getNamedRange in interface WorkBook
Parameters:
rangename -
Returns:
Throws:
com.extentech.formats.XLS.CellNotFoundException
See Also:
WorkBookHandle.getNamedRange(java.lang.String)

getNamedRangeInScope

public NameHandle getNamedRangeInScope(String rangename)
                                throws com.extentech.formats.XLS.CellNotFoundException
Parameters:
rangename -
Returns:
Throws:
com.extentech.formats.XLS.CellNotFoundException
See Also:
WorkBookHandle.getNamedRangeInScope(java.lang.String)

getNamedRanges

public NameHandle[] getNamedRanges()
Description copied from interface: WorkBook
Returns all Named Range Handles

Specified by:
getNamedRanges in interface WorkBook
Returns:
See Also:
WorkBookHandle.getNamedRanges()

getNamedRangesInScope

public NameHandle[] getNamedRangesInScope()
Returns:
See Also:
WorkBookHandle.getNamedRangesInScope()

getNoSheetWorkBook

public WorkBookHandle getNoSheetWorkBook()
Description copied from interface: WorkBook
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");

Specified by:
getNoSheetWorkBook in interface WorkBook
Returns:
See Also:
WorkBookHandle.getNoSheetWorkBook()

getNumCells

public int getNumCells()
Description copied from interface: WorkBook
Returns the number of Cells in this WorkBook

Specified by:
getNumCells in interface WorkBook
Returns:
See Also:
WorkBookHandle.getNumCells()

getNumWorkSheets

public int getNumWorkSheets()
Returns:
See Also:
WorkBookHandle.getNumWorkSheets()

getPivotTable

public PivotTableHandle getPivotTable(String ptname)
                               throws com.extentech.formats.XLS.PivotTableNotFoundException
Description copied from interface: WorkBook
get a handle to a PivotTable in the WorkBook

Specified by:
getPivotTable in interface WorkBook
Parameters:
ptname -
Returns:
Throws:
com.extentech.formats.XLS.PivotTableNotFoundException
See Also:
WorkBookHandle.getPivotTable(java.lang.String)

getPivotTables

public PivotTableHandle[] getPivotTables()
                                  throws com.extentech.formats.XLS.PivotTableNotFoundException
Description copied from interface: WorkBook
get an array of handles to all PivotTables in the WorkBook

Specified by:
getPivotTables in interface WorkBook
Returns:
Throws:
com.extentech.formats.XLS.PivotTableNotFoundException
See Also:
WorkBookHandle.getPivotTables()

getProperties

public Map getProperties()
Description copied from class: com.extentech.ExtenDOC.DocHandle
Retrieves a Map containing the workbook properties store. This is not an Excel-compatible feature.

Overrides:
getProperties in class com.extentech.ExtenDOC.DocHandle
Returns:
See Also:
DocumentHandle.getProperties()

getProperty

public Object getProperty(String name)
Description copied from class: com.extentech.ExtenDOC.DocHandle
Retrieves the a property in the workbook property store. This is not an Excel-compatible feature.

Specified by:
getProperty in interface Document
Specified by:
getProperty in interface WorkBook
Overrides:
getProperty in class com.extentech.ExtenDOC.DocHandle
Parameters:
name -
Returns:
See Also:
DocumentHandle.getProperty(java.lang.String)

getStats

public String getStats()
Returns:
See Also:
WorkBookHandle.getStats()

getStats

public String getStats(boolean usehtml)
Parameters:
usehtml -
Returns:
See Also:
WorkBookHandle.getStats(boolean)

getWorkBook

public com.extentech.formats.XLS.WorkBook getWorkBook()
Description copied from interface: WorkBook
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.

Specified by:
getWorkBook in interface WorkBook
Returns:
See Also:
WorkBookHandle.getWorkBook()

getWorkingDirectory

public String getWorkingDirectory()
Description copied from class: com.extentech.ExtenDOC.DocHandle
Returns the directory containing the ExtenXLS.jar and extenxls.lic files. This must be called BEFORE using the byte Array WorkBookHandle constructor.

Specified by:
getWorkingDirectory in interface Document
Specified by:
getWorkingDirectory in interface WorkBook
Overrides:
getWorkingDirectory in class com.extentech.ExtenDOC.DocHandle
Returns:
See Also:
DocumentHandle.getWorkingDirectory()

getWorkSheet

public WorkSheetHandle getWorkSheet(int sheetnum)
                             throws com.extentech.formats.XLS.WorkSheetNotFoundException
Description copied from interface: WorkBook
returns the handle to a WorkSheet by name.

Specified by:
getWorkSheet in interface WorkBook
Parameters:
sheetnum -
Returns:
Throws:
com.extentech.formats.XLS.WorkSheetNotFoundException
See Also:
WorkBookHandle.getWorkSheet(int)

getWorkSheet

public WorkSheetHandle getWorkSheet(String handstr)
                             throws com.extentech.formats.XLS.WorkSheetNotFoundException
Description copied from interface: WorkBook
returns the handle to a WorkSheet by name.

Specified by:
getWorkSheet in interface WorkBook
Parameters:
handstr -
Returns:
Throws:
com.extentech.formats.XLS.WorkSheetNotFoundException
See Also:
WorkBookHandle.getWorkSheet(java.lang.String)

getWorkSheets

public WorkSheetHandle[] getWorkSheets()
Description copied from interface: WorkBook
Returns an array of handles to all of the WorkSheets in the Workbook.

Specified by:
getWorkSheets in interface WorkBook
Returns:
See Also:
WorkBookHandle.getWorkSheets()

getXLSVersionString

public String getXLSVersionString()
Returns:
See Also:
WorkBookHandle.getXLSVersionString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Returns:
See Also:
Object.hashCode()

is1904

public boolean is1904()
Returns:
See Also:
WorkBookHandle.is1904()

removeAllWorkSheets

public void removeAllWorkSheets()
Description copied from interface: WorkBook
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.

Specified by:
removeAllWorkSheets in interface WorkBook
See Also:
WorkBookHandle.removeAllWorkSheets()

reset

public void reset()
Description copied from class: com.extentech.ExtenDOC.DocHandle
Resets the values of this WorkBookHandle to defaults.

Specified by:
reset in interface Document
Specified by:
reset in interface WorkBook
Overrides:
reset in class com.extentech.ExtenDOC.DocHandle
See Also:
DocumentHandle.reset()

searchAndReplace

public int searchAndReplace(String searchfor,
                            String replacewith)
Description copied from class: com.extentech.ExtenDOC.DocHandle
Searches all Cel ls in the workbook for the string occurrence and replaces with the replacement text.

Overrides:
searchAndReplace in class com.extentech.ExtenDOC.DocHandle
Parameters:
searchfor -
replacewith -
Returns:
See Also:
WorkBookHandle.searchAndReplace(java.lang.String, java.lang.String)

setDebugLevel

public void setDebugLevel(int l)
Description copied from class: com.extentech.ExtenDOC.DocHandle
Set the Debugging level. Higher values output more debugging info during execution.

Specified by:
setDebugLevel in interface Document
Specified by:
setDebugLevel in interface WorkBook
Overrides:
setDebugLevel in class com.extentech.ExtenDOC.DocHandle
Parameters:
l -
See Also:
DocumentHandle.setDebugLevel(int)

setDefaultColWidth

public void setDefaultColWidth(int t)
Description copied from interface: WorkBook
set Default col width Note: only affects undefined Columns containing Cells

Specified by:
setDefaultColWidth in interface WorkBook
Parameters:
t -
See Also:
WorkBookHandle.setDefaultColWidth(int)

setDefaultRowHeight

public void setDefaultRowHeight(int t)
Description copied from interface: WorkBook
set Default row height Note: only affects undefined Rows containing Cells

Specified by:
setDefaultRowHeight in interface WorkBook
Parameters:
t -
See Also:
WorkBookHandle.setDefaultRowHeight(int)

setDupeStringMode

public void setDupeStringMode(int mode)
Description copied from class: com.extentech.ExtenDOC.DocHandle
May 15, 2010

Specified by:
setDupeStringMode in interface Document
Specified by:
setDupeStringMode in interface WorkBook
Overrides:
setDupeStringMode in class com.extentech.ExtenDOC.DocHandle
Parameters:
mode -
See Also:
WorkBookHandle.setDupeStringMode(int)

setFormulaCalculationMode

public void setFormulaCalculationMode(int CalcMode)
Description copied from interface: WorkBook
Explicit calcing of formulas

Specified by:
setFormulaCalculationMode in interface WorkBook
Parameters:
CalcMode -
See Also:
WorkBookHandle.setFormulaCalculationMode(int)

setName

public void setName(String nm)
Description copied from class: com.extentech.ExtenDOC.DocHandle
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
Specified by:
setName in interface WorkBook
Overrides:
setName in class com.extentech.ExtenDOC.DocHandle
Parameters:
nm -
See Also:
DocumentHandle.setName(java.lang.String)

setProperties

public void setProperties(Map properties)
Description copied from class: com.extentech.ExtenDOC.DocHandle
Replaces the workbook properties store with the given Map. This is not an Excel-compatible feature.

Overrides:
setProperties in class com.extentech.ExtenDOC.DocHandle
Parameters:
properties -
See Also:
DocumentHandle.setProperties(java.util.Map)

setProtected

public void setProtected(boolean b)
Description copied from interface: Document
set the workbook to protected mode Note: the password cannot be decrypted or changed in Excel -- protection can only be set/removed using ExtenXLS

Specified by:
setProtected in interface Document
Specified by:
setProtected in interface WorkBook
Overrides:
setProtected in class com.extentech.ExtenDOC.DocHandle
Parameters:
b -
See Also:
WorkBookHandle.setProtected(boolean)

setStringEncodingMode

public void setStringEncodingMode(int mode)
Description copied from interface: Document
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

Specified by:
setStringEncodingMode in interface Document
Specified by:
setStringEncodingMode in interface WorkBook
Overrides:
setStringEncodingMode in class com.extentech.ExtenDOC.DocHandle
Parameters:
mode -
See Also:
WorkBookHandle.setStringEncodingMode(int)

toString

public String toString()
Description copied from class: com.extentech.ExtenDOC.DocHandle
Returns the name of this Sheet.

Specified by:
toString in interface Document
Specified by:
toString in interface WorkBook
Overrides:
toString in class com.extentech.ExtenDOC.DocHandle
Returns:
See Also:
DocumentHandle.toString()

write

public void write(OutputStream out,
                  boolean Excel2007Format)
Parameters:
out -
Excel2007Format -
See Also:
WorkBookHandle.write(java.io.OutputStream, boolean)

write

public void write(OutputStream out)
Description copied from class: com.extentech.ExtenDOC.DocHandle
Saves the WorkBookHandle to this opened OutputStream If original file is Excel2007 Format, the template will be written in Excel 2007 (XLSX) Format. Otherwise, it will be written in Excel 2003 Format.

Overrides:
write in class com.extentech.ExtenDOC.DocHandle
Parameters:
out -
See Also:
WorkBookHandle.write(java.io.OutputStream)

write

public void write(String fname,
                  boolean Excel2007Format)
Description copied from class: com.extentech.ExtenDOC.DocHandle
saves this WorkBookHandle to filename and path fname if Excel2007 Format, the template will be written in Excel 2007 (XLSX) Format. Otherwise, it will be written in Excel 2003 Format. NOTE: for Excel2007Format, if the file has an OOXML vba project, the file extension must be ".xlsm". It will be changed from ".xlsx" if necessary.

Overrides:
write in class com.extentech.ExtenDOC.DocHandle
Parameters:
fname -
Excel2007Format -
See Also:
WorkBookHandle.write(java.lang.String, boolean)

write

public void write(String fname)
Description copied from class: com.extentech.ExtenDOC.DocHandle
Saves this WorkBookHandle to filename and path fname if the filename ends with ".xlsx" or ".xlsm", the template will be written in Excel 2007 (XLSX) Format. Otherwise, it will be written in Excel 2003 Format. NOTE: for Excel2007 Format, if the file has an OOXML vba project, the file extension must be ".xlsm". It will be changed from ".xlsx" if necessary.

Overrides:
write in class com.extentech.ExtenDOC.DocHandle
Parameters:
fname -
See Also:
WorkBookHandle.write(java.lang.String)

writeBytes

public StringBuffer writeBytes(OutputStream bout)
Specified by:
writeBytes in interface Document
Specified by:
writeBytes in interface WorkBook
Overrides:
writeBytes in class MemeDocument
Parameters:
bout -
Returns:
See Also:
WorkBookHandle.writeBytes(java.io.OutputStream)

writeXLSXBytes

public void writeXLSXBytes(OutputStream bout)
                    throws Exception
Parameters:
bout -
Throws:
Exception
See Also:
WorkBookHandle.writeXLSXBytes(java.io.OutputStream)


Copyright © 2010 Extentech Inc. All Rights Reserved.