|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.extentech.ExtenXLS.DocumentHandle
com.extentech.ExtenXLS.WorkBookHandle
com.extentech.ExtenXLS.WorkBookParser
public class WorkBookParser
A READ-ONLY WorkBookHandle implementation which handles high-performance spreadsheet reading using a parse-event driven model. The constructor to this class takes a ParseEventListener which is registered as a listener on the parsing of the spreadsheet cells. Parse Event listeners are fired while parsing cells in a workbook. example:
// create a new custom cell value class
class testCellParseEventListener implements CellParseEventListener{
// override the fire method
// @see com.extentech.ExtenXLS.CellParseEventListener#fireEvent(com.extentech.ExtenXLS.Cell)
public void fireEvent(Cell v) {
// Logger.logInfo("Got Cell: " + v.toString());
Object val = v.getVal();
String formattedVal = v.getFormattedStringVal();
String celladdress = v.getCellAddress();
String sheetname = v.getWorkSheetName();
int rownum = v.getRowNum();
int colnum = v.getColNum();
int formatid = v.getFormatId();
}
}
// create new parse event listener
testCellParseEventListener tcv = new testCellParseEventListener();
WorkBookParser wbpp = null;
if (encrypted) {
wbpp = (WorkBookParser) MSOfficeDecrypter.decryptPP(is, password, tcv);
} else {
wbpp = new WorkBookParser(is,tcv);
}
The parser handles reading XLS, XLSX, and encrypted input of either variety.
You will need to implement code in the "CellParseEventListener" to register event handling for parse events
which occur as the parser encounters spreadsheet values in the file stream.
Cell,
CellParseEventListener,
SimpleCellValue,
WorkBookParser| Field Summary |
|---|
| Fields inherited from class com.extentech.ExtenXLS.WorkBookHandle |
|---|
CONVERTMULBLANKS, FORMAT_XLS, FORMAT_XLSM, FORMAT_XLSX, FORMAT_XLTM, FORMAT_XLTX, simpledateformat |
| Fields inherited from class com.extentech.ExtenXLS.DocumentHandle |
|---|
FORMAT_NATIVE |
| Fields inherited from interface com.extentech.ExtenXLS.WorkBook |
|---|
ALLOWDUPES, CALC_MODE_PROP, CALCULATE_ALWAYS, CALCULATE_AUTO, CALCULATE_EXPLICIT, REFTRACK_PROP, SHAREDUPES, STRING_ENCODING_AUTO, STRING_ENCODING_COMPRESSED, STRING_ENCODING_UNICODE, USETEMPFILE_PROP |
| Fields inherited from interface com.extentech.ExtenXLS.Document |
|---|
DEBUG_HIGH, DEBUG_LOW, DEBUG_MEDIUM |
| Constructor Summary | |
|---|---|
WorkBookParser()
override default constructor which initializes default workbook |
|
WorkBookParser(java.io.InputStream inx,
CellParseEventListener tcv)
this constructor takes an inputstream and your custom CellParseEventListener |
|
| Method Summary | |
|---|---|
void |
addListener(CellParseEventListener listener)
|
void |
addProperty(java.lang.String name,
java.lang.Object val)
Sets the value of a property in the workbook property store. |
boolean |
addSheetFromWorkBook(WorkBookHandle sourceBook,
java.lang.String sourceSheetName,
java.lang.String destSheetName)
Deprecated. |
boolean |
addSheetFromWorkBookWithFormatting(WorkBookHandle sourceBook,
java.lang.String sourceSheetName,
java.lang.String destSheetName)
Deprecated. |
WorkSheetHandle |
addWorkSheet(WorkSheetHandle sourceSheet)
Inserts a WorkSheetHandle from a separate WorkBookhandle into the current WorkBookHandle. |
WorkSheetHandle |
addWorkSheet(WorkSheetHandle sourceSheet,
java.lang.String NewSheetName)
Inserts a WorkSheetHandle from a separate WorkBookhandle into the current WorkBookHandle. |
void |
calculateFormulas()
Forces immediate recalculation of every formula in the workbook. |
void |
close()
Closes the WorkBook and releases resources. |
void |
copyChartToSheet(ChartHandle chart,
WorkSheetHandle sheet)
Copies an existing Chart to another WorkSheet |
void |
copyChartToSheet(java.lang.String chartname,
java.lang.String sheetname)
Copies an existing Chart to another WorkSheet |
WorkSheetHandle |
copyWorkSheet(java.lang.String SourceSheetName,
java.lang.String NewSheetName)
Copy (duplicate) a worksheet in the workbook and add it to the end of the workbook with a new name |
ChartHandle |
createChart(java.lang.String name,
WorkSheetHandle wsh)
Creates a new Chart and places it at the end of the workbook |
NameHandle |
createNamedRange(java.lang.String name,
java.lang.String rangeDef)
Create a named range in the workbook Note that the named range designation can conform to excel specs, that is, boolean values, references, or string variables can be set. |
void |
deleteChart(java.lang.String chartname,
WorkSheetHandle wsh)
delete an existing chart of the workbook |
void |
fireParserEvent()
notify the registered listeners of a parse event |
java.lang.String[] |
getAllStrings()
Returns all strings that are in the SharedStringTable for this workbook. |
byte[] |
getBytes()
Deprecated. |
CellHandle |
getCell(java.lang.String address)
Returns the Cell at the specified Location |
CellRange[] |
getCellRanges()
Returns an Array of the CellRanges existing in this WorkBook specifically the Ranges referenced in Formulas, Charts, and Named Ranges. |
CellHandle[] |
getCells()
Returns an array containing all cells in the WorkBook |
ChartHandle |
getChart(java.lang.String chartname)
Returns a Chart Handle |
ChartHandle |
getChartById(int id)
retrieve a ChartHandle via id |
ChartHandle[] |
getCharts()
Returns all Chart Handles contained in the WorkBook |
FormatHandle[] |
getConditionalFormats()
Returns an array of all Conditional Formats in the workbook these are formats referenced and used by the conditionally formatted ranges in the workbook. |
com.extentech.formats.XLS.WorkBookFactory |
getFactory()
Gets the internal Factory object. |
FormatHandle[] |
getFormats()
Returns an array of all FormatHandles in the workbook |
FormulaHandle |
getFormulaHandle(java.lang.String celladdress)
Returns a Formula Handle |
ImageHandle |
getImage(java.lang.String imagename)
Returns an ImageHandle for manipulating images in the WorkBook |
java.io.File |
getImage(java.lang.String fname,
int thumbWidth,
int thumbHeight,
int frameWidth,
int frameHeight)
Generate a thumbnail JPEG image of the first worksheet in the workbook Feb 8, 2011 |
ImageHandle[] |
getImages()
Returns all ImageHandles in the workbook |
com.extentech.formats.LEO.LEOFile |
getLEOFile()
Gets the internal LEOFile object. |
java.util.List |
getListeners()
|
NameHandle |
getNamedRange(java.lang.String rangename)
Returns a Named Range Handle |
NameHandle |
getNamedRangeInScope(java.lang.String rangename)
Returns a Named Range Handle if it exists in the specified scope. |
NameHandle[] |
getNamedRanges()
Returns all Named Range Handles |
NameHandle[] |
getNamedRangesInScope()
Returns all Named Range Handles scoped to WorkBook. |
WorkBookHandle |
getNoSheetWorkBook()
Returns a WorkBookHandle containing an empty version of this WorkBook. |
int |
getNumCells()
Returns the number of Cells in this WorkBook |
PivotTableHandle |
getPivotTable(java.lang.String ptname)
get a handle to a PivotTable in the WorkBook |
PivotTableHandle[] |
getPivotTables()
get an array of handles to all PivotTables in the WorkBook |
java.util.Map |
getProperties()
Retrieves a Map containing the workbook properties store. |
java.lang.Object |
getProperty(java.lang.String name)
Retrieves a property in the workbook property store. |
java.lang.String |
getStats()
Return useful statistics about this workbook. |
java.lang.String |
getStats(boolean usehtml)
Return useful statistics about this workbook. |
Cell |
getVal()
|
java.lang.String |
getWorkingDirectory()
|
java.lang.String |
getXLSVersionString()
Returns the lowest version of Excel compatible with the input file. |
int |
hashCode()
|
boolean |
is1904()
Returns whether this WorkBook is using the '1904' date system. |
void |
markFormulasDirty()
Marks every formula in the workbook as needing a recalc. |
void |
recalc()
Recalculates all dirty formulas in the workbook immediately. |
void |
reset()
Resets the document state to what it was when it was loaded. |
int |
searchAndReplace(java.lang.String searchfor,
java.lang.String replacewith)
Searches all Cells in the workbook for the string occurrence and replaces with the replacement text. |
void |
setCurrentObject(Cell o)
sets the currently parsed object |
void |
setDebugLevel(int l)
Sets the debugging output level. |
void |
setDefaultColWidth(int t)
set Default col width Note: only affects undefined Columns containing Cells default width of the columns in 1/256 of the width of the zero character, using default font. |
void |
setDefaultRowHeight(int t)
set Default row height in twips (=1/20 of a point) Note: only affects undefined Rows containing Cells |
void |
setDupeStringMode(int mode)
Set Duplicate String Handling Mode. |
void |
setFormulaCalculationMode(int CalcMode)
Set the calculation mode for the workbook. |
void |
setProperties(java.util.Map properties)
Replaces the workbook properties with the values in a 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 |
setShowSheetTabs(boolean show)
Sets whether the sheet selection tabs should be shown. |
void |
setStringEncodingMode(int mode)
Set Encoding mode of new Strings added to file. |
boolean |
showSheetTabs()
Returns whether the sheet selection tabs should be shown. |
void |
write(java.io.OutputStream out)
Writes the document to the given stream in its native format. |
void |
write(java.io.OutputStream out,
boolean Excel2007Format)
Deprecated. |
void |
write(java.io.OutputStream out,
int format)
Writes the document to the given stream in the requested format. |
void |
write(java.lang.String fname)
Writes the document to the given path. |
void |
write(java.lang.String fname,
boolean Excel2007Format)
Writes the document to the given file in either XLS or XLSX. |
java.lang.StringBuffer |
writeBytes(java.io.OutputStream bout)
Writes the document to the given stream in BIFF8 (XLS) format. |
void |
writeXLSXBytes(java.io.OutputStream bout)
Writes the document to the given stream in the default OOXML format. |
void |
writeXLSXBytes(java.io.OutputStream bout,
int format)
Writes the document to the given stream in the requested OOXML format. |
| Methods inherited from class com.extentech.ExtenXLS.WorkBookHandle |
|---|
createWorkSheet, createWorkSheet, getFileExtension, getFormat, getFormat, getFormulaCalculationMode, getIsExcel2007, getName, getNumWorkSheets, getWorkBook, getWorkSheet, getWorkSheet, getWorkSheets, isEventMode, removeAllWorkSheets, saveComponentAsJPEG, saveImageAsJPEG, setEventMode, setIsExcel2007 |
| Methods inherited from class com.extentech.ExtenXLS.DocumentHandle |
|---|
getFile, getFileName, getInstance, getVersion, setFile, setFileName, setName, setStreamingSheets, toString, write, write |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.extentech.ExtenXLS.WorkBook |
|---|
setName, toString |
| Constructor Detail |
|---|
public WorkBookParser()
public WorkBookParser(java.io.InputStream inx,
CellParseEventListener tcv)
inx - the inputstream containing your XLS filetcv - the custom CellParseEventListener| Method Detail |
|---|
public java.util.List getListeners()
public void addListener(CellParseEventListener listener)
listeners - The listeners to set.public void fireParserEvent()
public void addProperty(java.lang.String name,
java.lang.Object val)
DocumentHandle
addProperty in interface DocumentaddProperty in interface WorkBookaddProperty in class DocumentHandlename - val - DocumentHandle.addProperty(java.lang.String, java.lang.Object)
public boolean addSheetFromWorkBook(WorkBookHandle sourceBook,
java.lang.String sourceSheetName,
java.lang.String destSheetName)
WorkBookHandle
addSheetFromWorkBook in interface WorkBookaddSheetFromWorkBook in class WorkBookHandlesourceBook - sourceSheetName - destSheetName -
WorkBookHandle.addSheetFromWorkBook(com.extentech.ExtenXLS.WorkBookHandle, java.lang.String, java.lang.String)
public boolean addSheetFromWorkBookWithFormatting(WorkBookHandle sourceBook,
java.lang.String sourceSheetName,
java.lang.String destSheetName)
WorkBookHandle
addSheetFromWorkBookWithFormatting in class WorkBookHandlesourceBook - sourceSheetName - destSheetName -
WorkBookHandle.addSheetFromWorkBookWithFormatting(com.extentech.ExtenXLS.WorkBookHandle, java.lang.String, java.lang.String)
public WorkSheetHandle addWorkSheet(WorkSheetHandle sourceSheet,
java.lang.String NewSheetName)
WorkBookHandle
addWorkSheet in interface WorkBookaddWorkSheet in class WorkBookHandlesourceSheet - NewSheetName -
WorkBookHandle.addWorkSheet(com.extentech.ExtenXLS.WorkSheetHandle, java.lang.String)public WorkSheetHandle addWorkSheet(WorkSheetHandle sourceSheet)
WorkBookHandle
addWorkSheet in class WorkBookHandlesourceSheet -
WorkBookHandle.addWorkSheet(com.extentech.ExtenXLS.WorkSheetHandle)public void calculateFormulas()
WorkBookHandle
calculateFormulas in interface WorkBookcalculateFormulas in class WorkBookHandleWorkBookHandle.calculateFormulas()public void close()
WorkBookHandle
close in interface java.io.Closeableclose in class WorkBookHandleCloseable.close()
public void copyChartToSheet(ChartHandle chart,
WorkSheetHandle sheet)
throws com.extentech.formats.XLS.ChartNotFoundException,
com.extentech.formats.XLS.WorkSheetNotFoundException
WorkBookHandle
copyChartToSheet in interface WorkBookcopyChartToSheet in class WorkBookHandlechart - sheet -
com.extentech.formats.XLS.ChartNotFoundException
com.extentech.formats.XLS.WorkSheetNotFoundExceptionWorkBookHandle.copyChartToSheet(com.extentech.ExtenXLS.ChartHandle, com.extentech.ExtenXLS.WorkSheetHandle)
public void copyChartToSheet(java.lang.String chartname,
java.lang.String sheetname)
throws com.extentech.formats.XLS.ChartNotFoundException,
com.extentech.formats.XLS.WorkSheetNotFoundException
WorkBookHandle
copyChartToSheet in interface WorkBookcopyChartToSheet in class WorkBookHandlechartname - sheetname -
com.extentech.formats.XLS.ChartNotFoundException
com.extentech.formats.XLS.WorkSheetNotFoundExceptionWorkBookHandle.copyChartToSheet(java.lang.String, java.lang.String)
public WorkSheetHandle copyWorkSheet(java.lang.String SourceSheetName,
java.lang.String NewSheetName)
throws com.extentech.formats.XLS.WorkSheetNotFoundException
WorkBookHandle
copyWorkSheet in interface WorkBookcopyWorkSheet in class WorkBookHandleSourceSheetName - NewSheetName -
com.extentech.formats.XLS.WorkSheetNotFoundExceptionWorkBookHandle.copyWorkSheet(java.lang.String, java.lang.String)
public ChartHandle createChart(java.lang.String name,
WorkSheetHandle wsh)
WorkBookHandle
createChart in class WorkBookHandlename - wsh -
WorkBookHandle.createChart(java.lang.String, com.extentech.ExtenXLS.WorkSheetHandle)
public NameHandle createNamedRange(java.lang.String name,
java.lang.String rangeDef)
WorkBookHandle
createNamedRange in class WorkBookHandlename - rangeDef -
WorkBookHandle.createNamedRange(java.lang.String, java.lang.String)
public void deleteChart(java.lang.String chartname,
WorkSheetHandle wsh)
throws com.extentech.formats.XLS.ChartNotFoundException
WorkBookHandle
deleteChart in class WorkBookHandlechartname - wsh -
com.extentech.formats.XLS.ChartNotFoundExceptionWorkBookHandle.deleteChart(java.lang.String, com.extentech.ExtenXLS.WorkSheetHandle)public java.lang.String[] getAllStrings()
WorkBookHandle
getAllStrings in class WorkBookHandleWorkBookHandle.getAllStrings()public byte[] getBytes()
WorkBookHandle
getBytes in interface WorkBookgetBytes in class WorkBookHandleWorkBookHandle.getBytes()
public CellHandle getCell(java.lang.String address)
throws com.extentech.formats.XLS.CellNotFoundException,
com.extentech.formats.XLS.WorkSheetNotFoundException
WorkBookHandle
getCell in interface WorkBookgetCell in class WorkBookHandleaddress -
com.extentech.formats.XLS.CellNotFoundException
com.extentech.formats.XLS.WorkSheetNotFoundExceptionWorkBookHandle.getCell(java.lang.String)public CellRange[] getCellRanges()
WorkBookHandle
getCellRanges in class WorkBookHandleWorkBookHandle.getCellRanges()public CellHandle[] getCells()
WorkBookHandle
getCells in interface WorkBookgetCells in class WorkBookHandleWorkBookHandle.getCells()
public ChartHandle getChart(java.lang.String chartname)
throws com.extentech.formats.XLS.ChartNotFoundException
WorkBookHandle
getChart in interface WorkBookgetChart in class WorkBookHandlechartname -
com.extentech.formats.XLS.ChartNotFoundExceptionWorkBookHandle.getChart(java.lang.String)
public ChartHandle getChartById(int id)
throws com.extentech.formats.XLS.ChartNotFoundException
WorkBookHandle
getChartById in class WorkBookHandleid -
com.extentech.formats.XLS.ChartNotFoundExceptionWorkBookHandle.getChartById(int)public ChartHandle[] getCharts()
WorkBookHandle
getCharts in interface WorkBookgetCharts in class WorkBookHandleWorkBookHandle.getCharts()public FormatHandle[] getConditionalFormats()
WorkBookHandle
getConditionalFormats in class WorkBookHandleWorkBookHandle.getConditionalFormats()public com.extentech.formats.XLS.WorkBookFactory getFactory()
WorkBookHandleWARNING: This method is not part of the public API. Its use is not supported and behavior is subject to change.
getFactory in class WorkBookHandlecom.extentech.ExtenXLS.DocumentHandle#getFactory()public FormatHandle[] getFormats()
WorkBookHandle
getFormats in interface WorkBookgetFormats in class WorkBookHandleWorkBookHandle.getFormats()
public FormulaHandle getFormulaHandle(java.lang.String celladdress)
throws com.extentech.formats.XLS.FormulaNotFoundException
WorkBookHandle
getFormulaHandle in class WorkBookHandlecelladdress -
com.extentech.formats.XLS.FormulaNotFoundExceptionWorkBookHandle.getFormulaHandle(java.lang.String)
public java.io.File getImage(java.lang.String fname,
int thumbWidth,
int thumbHeight,
int frameWidth,
int frameHeight)
throws java.lang.Exception
WorkBookHandle
getImage in class WorkBookHandlefname - thumbWidth - thumbHeight - frameWidth - frameHeight -
java.lang.ExceptionWorkBookHandle.getImage(java.lang.String, int, int, int, int)
public ImageHandle getImage(java.lang.String imagename)
throws com.extentech.formats.XLS.ImageNotFoundException
WorkBookHandle
getImage in class WorkBookHandleimagename -
com.extentech.formats.XLS.ImageNotFoundExceptionWorkBookHandle.getImage(java.lang.String)public ImageHandle[] getImages()
WorkBookHandle
getImages in class WorkBookHandleWorkBookHandle.getImages()public com.extentech.formats.LEO.LEOFile getLEOFile()
WorkBookHandleWARNING: This method is not part of the public API. Its use is not supported and behavior is subject to change.
getLEOFile in class WorkBookHandlecom.extentech.ExtenXLS.DocumentHandle#getLEOFile()
public NameHandle getNamedRange(java.lang.String rangename)
throws com.extentech.formats.XLS.CellNotFoundException
WorkBookHandle
getNamedRange in interface WorkBookgetNamedRange in class WorkBookHandlerangename -
com.extentech.formats.XLS.CellNotFoundExceptionWorkBookHandle.getNamedRange(java.lang.String)
public NameHandle getNamedRangeInScope(java.lang.String rangename)
throws com.extentech.formats.XLS.CellNotFoundException
WorkBookHandle
getNamedRangeInScope in class WorkBookHandlerangename -
com.extentech.formats.XLS.CellNotFoundExceptionWorkBookHandle.getNamedRangeInScope(java.lang.String)public NameHandle[] getNamedRanges()
WorkBookHandle
getNamedRanges in interface WorkBookgetNamedRanges in class WorkBookHandleWorkBookHandle.getNamedRanges()public NameHandle[] getNamedRangesInScope()
WorkBookHandle
getNamedRangesInScope in class WorkBookHandleWorkBookHandle.getNamedRangesInScope()public WorkBookHandle getNoSheetWorkBook()
WorkBookHandle
getNoSheetWorkBook in interface WorkBookgetNoSheetWorkBook in class WorkBookHandleWorkBookHandle.getNoSheetWorkBook()public int getNumCells()
WorkBookHandle
getNumCells in interface WorkBookgetNumCells in class WorkBookHandleWorkBookHandle.getNumCells()
public PivotTableHandle getPivotTable(java.lang.String ptname)
throws com.extentech.formats.XLS.PivotTableNotFoundException
WorkBookHandle
getPivotTable in interface WorkBookgetPivotTable in class WorkBookHandleptname -
com.extentech.formats.XLS.PivotTableNotFoundExceptionWorkBookHandle.getPivotTable(java.lang.String)
public PivotTableHandle[] getPivotTables()
throws com.extentech.formats.XLS.PivotTableNotFoundException
WorkBookHandle
getPivotTables in interface WorkBookgetPivotTables in class WorkBookHandlecom.extentech.formats.XLS.PivotTableNotFoundExceptionWorkBookHandle.getPivotTables()public java.util.Map getProperties()
DocumentHandle
getProperties in class DocumentHandleDocumentHandle.getProperties()public java.lang.Object getProperty(java.lang.String name)
DocumentHandle
getProperty in interface DocumentgetProperty in interface WorkBookgetProperty in class DocumentHandlename -
DocumentHandle.getProperty(java.lang.String)public java.lang.String getStats()
WorkBookHandle
getStats in class WorkBookHandleWorkBookHandle.getStats()public java.lang.String getStats(boolean usehtml)
WorkBookHandle
getStats in class WorkBookHandleusehtml -
WorkBookHandle.getStats(boolean)public java.lang.String getWorkingDirectory()
com.extentech.ExtenXLS.DocumentHandle#getWorkingDirectory()public java.lang.String getXLSVersionString()
WorkBookHandle
getXLSVersionString in class WorkBookHandleWorkBookHandle.getXLSVersionString()public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public boolean is1904()
WorkBookHandle
is1904 in class WorkBookHandleWorkBookHandle.is1904()public void markFormulasDirty()
WorkBookHandleWorkBookHandle.recalc().
markFormulasDirty in class WorkBookHandleWorkBookHandle.markFormulasDirty()public void recalc()
WorkBookHandleYou generally need not call this method. Dirty formulas will automatically be recalculated when their values are queried. This method is only useful for forcing calculation to occur at a certain time. In the case of functions such as NOW() whose value is volatile the formula will still be recalculated every time it is queried.
recalc in class WorkBookHandleWorkBookHandle.recalc()public void reset()
DocumentHandle
reset in interface Documentreset in interface WorkBookreset in class WorkBookHandleDocumentHandle.reset()
public int searchAndReplace(java.lang.String searchfor,
java.lang.String replacewith)
WorkBookHandle
searchAndReplace in class WorkBookHandlesearchfor - replacewith -
WorkBookHandle.searchAndReplace(java.lang.String, java.lang.String)public void setDebugLevel(int l)
DocumentHandle
setDebugLevel in interface DocumentsetDebugLevel in interface WorkBooksetDebugLevel in class DocumentHandlel - DocumentHandle.setDebugLevel(int)public void setDefaultColWidth(int t)
WorkBookHandle
setDefaultColWidth in interface WorkBooksetDefaultColWidth in class WorkBookHandlet - WorkBookHandle.setDefaultColWidth(int)public void setDefaultRowHeight(int t)
WorkBookHandle
setDefaultRowHeight in interface WorkBooksetDefaultRowHeight in class WorkBookHandlet - WorkBookHandle.setDefaultRowHeight(int)public void setDupeStringMode(int mode)
WorkBookHandle
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 String inserts, larger file sizes, changing Cells has no effect on dupe Cells
WorkBookHandle.SHAREDUPES - slower inserts, dupe smaller file sizes, Cells share changes
setDupeStringMode in interface WorkBooksetDupeStringMode in class WorkBookHandlemode - WorkBookHandle.setDupeStringMode(int)public void setProperties(java.util.Map properties)
DocumentHandle
setProperties in class DocumentHandleproperties - DocumentHandle.setProperties(java.util.Map)public void setProtected(boolean b)
WorkBookHandle
setProtected in interface WorkBooksetProtected in class WorkBookHandleb - WorkBookHandle.setProtected(boolean)public void setShowSheetTabs(boolean show)
WorkBookHandle
setShowSheetTabs in class WorkBookHandleshow - WorkBookHandle.setShowSheetTabs(boolean)public void setFormulaCalculationMode(int CalcMode)
WorkBookHandle
setFormulaCalculationMode in interface WorkBooksetFormulaCalculationMode in class WorkBookHandleCalcMode - Calculation mode to use in workbook.public void setStringEncodingMode(int mode)
WorkBookHandle
setStringEncodingMode in interface WorkBooksetStringEncodingMode in class WorkBookHandlemode - WorkBookHandle.setStringEncodingMode(int)public boolean showSheetTabs()
WorkBookHandle
showSheetTabs in class WorkBookHandleWorkBookHandle.showSheetTabs()
public void write(java.io.OutputStream out,
boolean Excel2007Format)
WorkBookHandle
write in class WorkBookHandleout - Excel2007Format - WorkBookHandle.write(java.io.OutputStream, boolean)
public void write(java.io.OutputStream out,
int format)
WorkBookHandleformat choices:
WorkBookHandle.FORMAT_XLS for 2003 and previous versions
WorkBookHandle.FORMAT_XLSX for non-macro-enabled 2007 version
WorkBookHandle.FORMAT_XLSM for macro-enabled 2007 version
WorkBookHandle.FORMAT_XLTM for macro-enabled 2007 templates.
WorkBookHandle.FORMAT_XLTX for 2007 templates,
IMPORTANT NOTE: if the resulting filename contains the .XLSM extension
the WorkBook MUST be written in FORMAT_XLSM; otherwise open errors will occur
NOTE: If the format is FORMAT_XLSX and the filename contains macros
the file will be written as Macro-Enabled i.e. in FORMAT_XLSM. In these cases,
the filename must contain the .XLSM extension
write in class WorkBookHandleout - format - WorkBookHandle.write(java.io.OutputStream, int)public void write(java.io.OutputStream out)
DocumentHandle
write in class DocumentHandleout - DocumentHandle.write(java.io.OutputStream)
public void write(java.lang.String fname,
boolean Excel2007Format)
WorkBookHandle
write in class WorkBookHandlefname - Excel2007Format - WorkBookHandle.write(java.lang.String, boolean)public void write(java.lang.String fname)
WorkBookHandle
write in class WorkBookHandlefname - WorkBookHandle.write(java.lang.String)public java.lang.StringBuffer writeBytes(java.io.OutputStream bout)
WorkBookHandleTo output a debugging StringBuffer, you must first set
the autolockdown setting:
props.put("com.extentech.ExtenXLS.autocreatelockdown","true");
writeBytes in interface WorkBookwriteBytes in class WorkBookHandlebout -
WorkBookHandle.writeBytes(java.io.OutputStream)
public void writeXLSXBytes(java.io.OutputStream bout,
int format)
throws java.lang.Exception
WorkBookHandle
writeXLSXBytes in class WorkBookHandlebout - format -
java.lang.Exception
java.lang.IllegalArgumentException - if the given type code is invalid
java.io.IOException - if an error occurs while writing to the streamWorkBookHandle.writeXLSXBytes(java.io.OutputStream, int)
public void writeXLSXBytes(java.io.OutputStream bout)
throws java.lang.Exception
WorkBookHandle
writeXLSXBytes in class WorkBookHandlebout -
java.lang.Exception
java.io.IOException - if an error occurs while writing to the streamWorkBookHandle.writeXLSXBytes(java.io.OutputStream)public void setCurrentObject(Cell o)
o - public Cell getVal()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||