public class WorkBook extends Object implements Serializable, XLSConstants, Book
The WorkBook record represents an XLS workbook substream containing worksheets and associated records.
WorkBook,
Boundsheet,
Index,
Dbcell,
Row,
Cell,
XLSRecord,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static int |
ALLOWDUPES |
Color[] |
colorTable |
static String |
CONVERTMULBLANKS |
HashMap |
formatCache |
int |
lastSPID |
MSODrawingGroup |
msodg |
AbstractList |
msodgMerge |
static int |
SHAREDUPES |
static int |
STRING_ENCODING_AUTO |
static int |
STRING_ENCODING_COMPRESSED |
static int |
STRING_ENCODING_UNICODE |
AI, ALRUNS, AREA, AREAFORMAT, ARRAY, ATTACHEDLABEL, AUTOFILTER, AXCENT, AXESUSED, AXIS, AXISLINEFORMAT, AXISPARENT, BACKUP, BAR, BEGIN, BLANK, BOF, BOOKBOOL, BOOLERR, BOPPOP, BOPPOPCUSTOM, BOTTOM_MARGIN, BOTTOMMARGIN, BOUNDSHEET, CALC_MODE_PROP, CALCCOUNT, CALCMODE, CALCULATE_ALWAYS, CALCULATE_AUTO, CALCULATE_EXPLICIT, CATLAB, CATSERRANGE, CF, CF12, CHART, CHART3DBARSHAPE, CHARTFORMAT, CHARTFORMATLINK, CHARTFRTINFO, CHARTLINE, CODENAME, COLINFO, CONDFMT, CONDFMT12, CONTINUE, COUNTRY, CRN, CRTLAYOUT12, CRTLAYOUT12A, DAT, DATAFORMAT, DATALABEXT, DATALABEXTCONTENTS, DATE1904, DBCELL, DCON, DCONBIN, DCONNAME, DCONREF, DEBUG_HIGH, DEBUG_LOW, DEBUG_MEDIUM, DEFAULTENCODING, DEFAULTROWHEIGHT, DEFAULTTEXT, DEFCOLWIDTH, DELTA, DIMENSIONS, DROPBAR, DSF, DV, DVAL, END, ENDBLOCK, ENDEXTSST, ENDOBJECT, EOF, EXCEL2K, EXTERNCOUNT, EXTERNNAME, EXTERNSHEET, EXTSST, FBI, FEATHEADR, FILE_LOCK, FILEPASS, FONT, FONTBASIS, FONTX, FOOTERREC, FORMAT, FORMULA, FRAME, FRTFONTLIST, FRTWRAPPER, GARBAGE, GELFRAME, GUTS, HCENTER, HEADERREC, HLINK, HORIZONTAL_PAGE_BREAKS, IFMT, INDEX, INTERFACE_HDR, ITERATION, LABEL, LABELSST, LEFT_MARGIN, LEFTMARGIN, LEGEND, LEGENDXN, LINE, LINEFORMAT, MARKERFORMAT, MAXCOLS, MAXCOLS_BIFF8, MAXRECLEN, MAXROWS, MAXROWS_BIFF8, MERGEDCELLS, MSODRAWING, MSODRAWINGGROUP, MSODRAWINGSELECTION, MULBLANK, MULRK, NAME, NOTE, NUMBER, OBJ, OBJECTLINK, OBJPROTECT, OBPROJ, PALETTE, PANE, PASSWORD, PHONETIC, PICF, PIE, PIEFORMAT, PIVOTCHARTBITS, PIVOTCHARTLINK, PLOTAREA, PLOTGROWTH, PLS, PLV, POS, PRECISION, PRINT_GRIDLINES, PRINT_ROW_HEADERS, PRINTGRID, PRINTROWCOL, PROT4REV, PROTECT, QSISXTAG, RADAR, RADARAREA, RANGEPROTECTION, REFMODE, REFTRACK_PROP, RIGHT_MARGIN, RIGHTMARGIN, RK, ROW, RRD_HEAD, RRD_INFO, RSTRING, RTENTEXU, RTMERGECELLS, SBASEREF, SCATTER, SCENPROTECT, SCL, SELECTION, SERAUXERRBAR, SERAUXTREND, SERFMT, SERIES, SERIESLIST, SERIESTEXT, SERPARENT, SERTOCRT, SETUP, SHEETLAYOUT, SHEETPROTECTION, SHRFMLA, SHTPROPS, SIIINDEX, SST, STARTBLOCK, STARTOBJECT, STRINGREC, STYLE, SUPBOOK, SURFACE, SXADDL, SXBOOL, SXDB, SXDBB, SXDBEX, SXDI, SXEX, SXFDB, SXFDBTYPE, SXFORMAT, SXIVD, SXLI, SXNUM, SXPI, SXSTREAMID, SXSTRING, SXVD, SXVDEX, SXVI, SXVIEW, SXVIEWEX9, SXVIEWLINK, SXVS, TABID, TABLE, TABLESTYLES, TEXTDISP, THREED, TICK, TOP_MARGIN, TOPMARGIN, TXO, TYPE_BLANK, TYPE_BOOLEAN, TYPE_DOUBLE, TYPE_FORMULA, TYPE_FP, TYPE_INT, TYPE_STRING, UNICODEENCODING, UNITS, USERBVIEW, USERSVIEWBEGIN, USERSVIEWEND, USETEMPFILE_PROP, USR_EXCL, VALIDATEWORKBOOK, VALUERANGE, VB_MODULE, VCENTER, VERTICAL_PAGE_BREAKS, WINDOW_PROTECT, WINDOW1, WINDOW2, WK_CHART, WK_FILE, WK_GLOBALS, WK_MACROSHEET, WK_WORKSHEET, WSBOOL, XCT, XF, XLS_MAX_COLS, YMULT| Constructor and Description |
|---|
WorkBook()
default constructor -- do init
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBoundsheet(Boundsheet bound,
String origSheetName,
String newSheetName,
String origWorkBookName,
boolean SSTPopulatedBoundsheet)
add a deserialized boundsheet to this workbook.
|
void |
addBoundsheet(byte[] inbytes,
String origSheetName,
String NewSheetName,
String origWorkBookName,
boolean SSTPopulatedBoundsheet)
Inserts a serialized boundsheet into the workboook.
|
Chart |
addChart(Chart destChart,
String NewChartName,
Boundsheet boundsht)
Inserts a serialized boundsheet chart into the workboook
|
void |
addChartUpdateMsodg(MSODrawing mso,
Boundsheet sht)
updates Mso (MSODrawingGroup + Msodrawing) records upon add/copy worksheet and add/copy charts
NOTE: this code is mainly garnered via trial and error, works
|
void |
addDefaultExternsheet()
For workbooks that do not contain an externsheet
this creates the externsheet record with one 0000 record
and the related Supbook rec
|
int |
addExternalName(String n)
Store an external name
|
void |
addExternsheet()
Inserts an externsheet into the recvec, provided one does not yet exist.
|
int |
addFont(Font f)
add a Font object to the collection of Fonts
|
int |
addFormat(Format format)
Adds an existing format record to the list of known formats.
|
void |
addFormula(Formula rec)
add formula to book and init the ptgs
|
void |
addIndirectFormula(Formula f) |
void |
addLocalName(Name name)
Add a sheet-scoped name record to the boundsheet
Note this is not that primary repository for names, it just contains the name records
that are bound to this book, adding them here will not add them to the workbook;
|
int |
addName(Name n)
add a Name object to the collection of names
|
void |
addNameUpdateSheetRefs(Name n,
String origWorkBookName) |
void |
addOOXMLObject(Object o)
adds the object-specific signature of the external or auxillary OOXML object
Object should be of String[] form,
key, path, local path + filename [, rid, [extra info], [embedded information]]
e.g.
|
void |
addPivotCache(String ref,
WorkBookHandle wbh,
int sId)
adds the Pivot Cache Directory Storage +Stream records necessary to
define the pivot cache (==pivot table data) for pivot table(s)
NOTE: at this time only 1 pivot cache is supported |
int |
addPivotStream(String ref,
String sheetName,
int sid)
NOT 100% IMPLEMENTE YET
creates the initial records for a Pivot Cache
A Pivot Cache identifies the data used in a Pivot Table NOTE: only SHEET cache sources are supported at this time |
protected void |
addPivotTable(Sxview sx) |
void |
addPreChart()
JM -
Add the requisite records in the book streamer for the chart.
|
BiffRec |
addRecord(BiffRec rec,
boolean addtorec)
Associate a record with its containers and related records.
|
void |
associateDereferencedNames(Name name)
Re-assocates ptgrefs that are pointing to a name that has been deleted then
is recreated
|
void |
changeWorkSheetOrder(Boundsheet bs,
int idx)
change the tab order of a boundsheet
|
void |
close()
clear out object references in prep for closing workbook
|
protected void |
closeRecords() |
void |
closeSheets()
clear out ALL sheet object refs
|
void |
copyChartToSheet(String chartname,
String sheetname)
Copies an existing Chart to another WorkSheet
|
void |
copyWorkSheet(String SourceSheetName,
String NewSheetName)
Copies a complete boundsheet within the workbook
If a name exists that refers directly to this sheet then duplicate it, otherwise workbook scoped names are
not copied
|
protected ByteStreamer |
createByteStreamer() |
MSODrawingGroup |
createMSODrawingGroup()
For workbooks that do not contain an MSODrawing group create a new one,
if the drawing group already exists return the existing
|
boolean |
defaultLanguageIsDBCS()
returns true if the default language selected in Excel is one of
the DBCS (Double-Byte Code Set) languages
The languages that support DBCS include Japanese, Chinese (Simplified), Chinese (Traditional), and Korean |
void |
deleteChart(String chartname,
Boundsheet sheet)
remove an existing chart from the workbook
NOTE: STILL EXPERIMENTAL TESTS OK IN BASIC CIRCUMSTANCES BUT MUST BE TESTED FURTHER
|
Sxview[] |
getAllPivotTableViews()
return all pivot table views (==Sxview records)
SxView is the top-level record of a Pivot Table as distinct from the PivotCache (stored data source in a LEOFile Storage) and PivotTable Stream (SxStream top-level record) |
String[] |
getAllStrings()
Returns all strings that are in the SharedStringTable for this workbook.
|
int |
getCalcId() |
int |
getCalcMode()
Sets the calculation mode for the workbook.
|
BiffRec |
getCell(String cellname)
get the cell by the following String Pattern
BiffRec c = getCell("SheetName!C17");
|
BiffRec |
getCell(String sheetname,
String cellname)
get the cell by the following String Pattern
BiffRec c = getCell("Sheet1", "C17");
|
BiffRec[] |
getCells()
get all of the Cells in this WorkBook
|
Chart |
getChart(String chartname)
Returns a Chart Handle
|
Chart[] |
getCharts() |
AbstractList |
getChartVect() |
String |
getCodename()
returns the workbook codename used by vba macros OOXML-specific
|
Color[] |
getColorTable() |
ContinueHandler |
getContinueHandler()
get a handle to the ContinueHandler
|
DateConverter.DateFormat |
getDateFormat()
Gets the date format used by this book.
|
int |
getDefaultIxfe() |
ArrayList |
getDxfs()
returns the list of dxf's (incremental style info) (int) OOXML-specific
|
int |
getExtenalNameNumber(String s)
apparently this method adds an External name rec and returns the ilbl
Correct structure is
Supbook
Externname
Supbook
Externsheet
|
String |
getExternalName(int t)
Get the external name at the specified index.
|
String[] |
getExternalNames()
Get a string array of external names
|
Supbook |
getExternalSupbook(String externalWorkbook,
boolean bCreate)
return the External Supbook record associated with the desired externalWorkbook
will create if bCreate
|
Externsheet |
getExternSheet()
get the Externsheet
|
Externsheet |
getExternSheet(boolean create)
return the Externsheet for this book
|
WorkBookFactory |
getFactory()
get a handle to the factory
|
String |
getFileName() |
int |
getFirstSheet()
returns the first non-hidden
sheet (int) in the workbook OOXML-specific
Mar 15, 2010
|
Font |
getFont(int t)
Get the font at the specified index.
|
int |
getFontIdx(Font f)
Get's the index for this particular front.
|
AbstractList |
getFontRecs()
Return the font records
|
Map |
getFontRecsAsXML()
Returns a map of xml strings representing the XF's in this workbook/Integer of lookup.
|
Format |
getFormat(int id)
Gets a custom number format by its format ID.
|
HashMap |
getFormatCache()
retrieve the format cache - links string vers.
|
short |
getFormatId(String pattern)
Gets the format ID for a given number format pattern.
|
Formula |
getFormula(String cellAddress) |
List |
getFormulaList()
returns the List of Formulas in the book
|
Formula[] |
getFormulas()
returns the array of Formulas in the book
|
AbstractList |
getHlinklookup() |
boolean |
getIsExcel2007()
returns truth of "Excel 2007" format
|
Boundsheet |
getLastbound() |
int |
getMatchingFontIndex(Font f)
Get's the index for this font, based on matching through
xml strings.
|
AbstractList |
getMergecelllookup() |
MSODrawingGroup |
getMSODrawingGroup()
Get the MsoDrawingGroup for this workbook
|
Name |
getName(int t)
returns a Named range by number
|
Name |
getName(String nameRef)
returns a named range by name string
This method will first attempt to look in the book names, then the sheet names,
obviously different scoped names can have the same identifying name, so this could return
one of multiple names if this is the case
|
int |
getNameNumber(String nameStr)
Returns the ilbl of the name record associated with the string passed in.
|
Name[] |
getNames()
Get a collection of all names in the workbook
|
int |
getNPivotTableViews() |
int |
getNumCells()
get the number of Cells in this WorkBook
|
int |
getNumFonts() |
int |
getNumFormats()
Gets the number of custom number formats registered on this book.
|
int |
getNumFormulas()
get the number of formulas in this WorkBook
|
int |
getNumWorkSheets()
Get the number of worksheets in this WorkBook
|
int |
getNumXfs() |
List |
getOOXMLObjects()
returns the list of OOXML objects which are external or auxillary to the main workbook
e.g.
|
PivotCache |
getPivotCache()
return the pivot cache, if any
|
SxStreamID |
getPivotStream(int cacheid)
returns the start of the stream defining the desired pivot cache
|
Sxview |
getPivotTableView(String nm) |
BookProtectionManager |
getProtectionManager()
Gets this sheet's SheetProtectionManager.
|
int |
getRecalculationMode()
Returns the recalculation mode for the Workbook:
0= Manual 1= Automatic 2= Automatic except for multiple table operations |
ReferenceTracker |
getRefTracker() |
Name |
getScopedName(String nameRef)
returns a scoped named range by name string
|
int |
getSelectedSheetNum()
sets the selected worksheet
|
Sst |
getSharedStringTable() |
Boundsheet |
getSheetFromRec(BiffRec rec,
Long lbplypos)
Dec 15, 2010
|
AbstractList |
getSheetVect()
returns the Vector of Boundsheets
|
String |
getStats()
Return some useful statistics about the WorkBook
|
String |
getStats(boolean usehtml)
Return some useful statistics about the WorkBook
|
ByteStreamer |
getStreamer()
Get a substream by name.
|
int |
getSupbookIndex(Supbook sb)
return the index into the Supbook records for this supbook
|
Supbook[] |
getSupBooks() |
TabID |
getTabID() |
Theme |
getTheme()
return the OOXML theme for this workbook, if any
|
Usersviewbegin |
getUsersviewbegin()
get a handle to the Usersviewbegin for the workbook
|
Name[] |
getWorkbookScopedNames()
Get a collection of all names in the workbook
|
Boundsheet |
getWorkSheetByHash(String s)
returns the Boundsheet with the specific Hashname
|
Boundsheet |
getWorkSheetByName(String bstr)
returns the Boundsheet with the specific name
|
Boundsheet |
getWorkSheetByNumber(int i)
returns the Boundsheet at the specific index
|
Xf |
getXf(int i)
return the XF record at the specified index
|
AbstractList |
getXfrecs() |
Map |
getXfrecsAsString()
Returns a map of xml strings representing the XF's in this workbook/Integer of lookup.
|
String |
getXLSVersionString() |
void |
initializeIndirectFormulas()
Initialize the indirect functions in this workbook by calculating the formulas
|
void |
initializeNames()
Init names at Post-load
|
int |
insertFont(Font x)
InsertFont inserts a Font record into the workbook level stream,
For some reason, the addFont only puts it into an array that is never accessed
on output.
|
int |
insertFormat(Format format)
Inserts a newly created Format record into the workbook.
|
void |
insertName(Name n)
Inserts a newly created Name record into the correct location in the streamer.
|
boolean |
is1904()
Deprecated.
Use
getDateFormat() instead. |
boolean |
isSharedupes() |
void |
mergeMSODrawingRecords() |
void |
prestream()
take care of any lazy updating before output
|
protected void |
reflectiveClone(WorkBook source) |
void |
removeChart(String chartname)
removes the desired chart from the list of charts
|
void |
removeFormula(Formula fmla)
remove a formula from the book
|
void |
removeLocalName(Name name)
Remove a sheet-scoped name record from the boundsheet.
|
boolean |
removeName(Name n) |
void |
removeWorkSheet(Boundsheet sheet)
remove a Boundsheet from the WorkBook
|
void |
removeXfRecs()
internally used in preparation for reading an 2007 and above workbook
|
void |
setCalcId(int i) |
void |
setCalcMode(int mode)
Sets the OpenXLS calculation mode for the workbook.
|
void |
setCodename(String s)
sets the workbook codename used by vba macros OOXML-specific
|
void |
setColorTable(Color[] clrtable) |
void |
setDebugLevel(int i)
set the Debug level
|
void |
setDefaultColWidth(int t)
set Default col width for all worksheets in the workbook,
Default column width can also be set on individual worksheets
|
void |
setDefaultIxfe(int defaultIxfe) |
void |
setDefaultRowHeight(int t)
set Default row height in twips (1/20 of a point)
|
void |
setDupeStringMode(int mode) |
void |
setDxfs(ArrayList dxfs)
sets the list of dxf's (incremental style info) (int) OOXML-specific
|
void |
setFactory(WorkBookFactory r)
get a handle to the Reader for this
WorkBook.
|
void |
setFirstBof(Bof b)
get a handle to the first BOF to perform offset functions which don't know where the
start of the file is due to the compound file format.
|
void |
setFirstSheet(int f)
sets the first sheet (int) in the workbook OOXML-specific
naive implementaiton does not account for hidden sheets
Mar 15, 2010
|
void |
setFirstVisibleSheet(Boundsheet bs2)
set the first visible tab
|
void |
setIsExcel2007(boolean b)
set truth of "Is Excel 2007"
true increases maximums of base storage, etc.
|
void |
setLastbound(Boundsheet lastbound) |
protected void |
setLastFormula(Formula f)
for those cases where a formula calculation adds a new string rec
need to explicitly set lastFormula before calling addRecord
|
void |
setMSODrawingGroup(MSODrawingGroup msodg)
Set the msodrawinggroup for this workbook
|
void |
setNewName(String oldname,
String newname)
rename the NamedRange in the lookup map
|
void |
setPivotCache(PivotCache pc)
set the pivot cache pointer
|
void |
setRecalcuationMode(int mode)
Sets the recalculation mode for the Workbook:
0= Manual 1= Automatic 2= Automatic except for multiple table operations |
void |
setSelectedSheet(Boundsheet bs)
sets the selected worksheet
|
void |
setSharedupes(boolean sharedupes) |
void |
setShowSheetTabs(boolean show)
Sets whether the sheet selection tabs should be shown.
|
void |
setStringEncodingMode(int mode) |
void |
setSubStream(ByteStreamer s) |
void |
setTheme(Theme t)
sets the OOXML theme for this 2007 verison workbook
|
boolean |
showSheetTabs()
Returns whether the sheet selection tabs should be shown.
|
int |
stream(OutputStream _out)
Write the contents of the WorkBook bytes to an OutputStream
|
String |
toString() |
void |
updateFormatCache(Xf xf)
formatCache:
links tostring of xf to xf rec for updating/reuse purposes
|
void |
updateMsodrawingHeaderRec(Boundsheet bs)
after changing the MSODrawings on a sheet, this is called to
update the header Msodrawing rec.
|
void |
updateNameIlbls()
After any changes in the name records
this method needs to be called in order to
update ilbl records
|
public static int STRING_ENCODING_AUTO
public static int STRING_ENCODING_UNICODE
public static int STRING_ENCODING_COMPRESSED
public static int ALLOWDUPES
public static int SHAREDUPES
public Color[] colorTable
public static String CONVERTMULBLANKS
public HashMap formatCache
public AbstractList msodgMerge
public MSODrawingGroup msodg
public int lastSPID
protected void reflectiveClone(WorkBook source)
protected ByteStreamer createByteStreamer()
public BookProtectionManager getProtectionManager()
public void mergeMSODrawingRecords()
public void updateMsodrawingHeaderRec(Boundsheet bs)
bs - public MSODrawingGroup getMSODrawingGroup()
public void setMSODrawingGroup(MSODrawingGroup msodg)
msodg - public MSODrawingGroup createMSODrawingGroup()
public String getStats()
public String getStats(boolean usehtml)
public String getXLSVersionString()
public void prestream()
public Chart[] getCharts()
public Supbook[] getSupBooks()
public List getOOXMLObjects()
public void addOOXMLObject(Object o)
o - public Theme getTheme()
public void setTheme(Theme t)
t - public Supbook getExternalSupbook(String externalWorkbook, boolean bCreate)
externalWorkbook - String URL (name) of External WorkbookbCreate - if true, will create an external SUPBOOK record for the externalWorkbookpublic int getSupbookIndex(Supbook sb)
sb - public AbstractList getChartVect()
protected void addPivotTable(Sxview sx)
public Sxview[] getAllPivotTableViews()
public int getNPivotTableViews()
public Externsheet getExternSheet(boolean create)
create - a new Externsheet if it does not existpublic Externsheet getExternSheet()
public short getFormatId(String pattern)
pattern - the number format pattern to look uppublic void initializeNames()
public int addName(Name n)
public int addExternalName(String n)
n - = String describing the namepublic String[] getExternalNames()
public String getExternalName(int t)
t - index of the namepublic void addDefaultExternsheet()
public int getExtenalNameNumber(String s)
s - PtgNameXpublic Name[] getNames()
public Name[] getWorkbookScopedNames()
public List getFormulaList()
public Formula[] getFormulas()
public void removeFormula(Formula fmla)
fmla - public int getRecalculationMode()
public void setRecalcuationMode(int mode)
public Name getName(int t)
t - public void setNewName(String oldname, String newname)
t - public void associateDereferencedNames(Name name)
name - public Name getName(String nameRef)
t - public Name getScopedName(String nameRef)
t - public int getNameNumber(String nameStr)
t, - the name record to search forpublic int getFontIdx(Font f)
public int getMatchingFontIndex(Font f)
public int insertFont(Font x)
public int addFont(Font f)
public int getNumFonts()
public Font getFont(int t)
t - public int insertFormat(Format format)
addFormat(io.starter.formats.XLS.Format) instead.public Formula getFormula(String cellAddress) throws FormulaNotFoundException
FormulaNotFoundExceptionpublic int addFormat(Format format)
insertFormat(io.starter.formats.XLS.Format) instead.format - the Format record to addpublic int getNumFormats()
public Format getFormat(int id)
public TabID getTabID()
public void setDefaultRowHeight(int t)
public void setDefaultColWidth(int t)
public int getSelectedSheetNum()
public void setSelectedSheet(Boundsheet bs)
protected void setLastFormula(Formula f)
f - public BiffRec addRecord(BiffRec rec, boolean addtorec)
public Boundsheet getSheetFromRec(BiffRec rec, Long lbplypos)
getSheetFromRec in interface Bookrec - public ContinueHandler getContinueHandler()
getContinueHandler in interface Bookpublic Usersviewbegin getUsersviewbegin()
public void setDebugLevel(int i)
setDebugLevel in interface Bookpublic void setFactory(WorkBookFactory r)
setFactory in interface Bookpublic int getNumWorkSheets()
public int getNumFormulas()
public int getNumCells()
public BiffRec[] getCells()
public BiffRec getCell(String cellname) throws CellNotFoundException, WorkSheetNotFoundException
public BiffRec getCell(String sheetname, String cellname) throws CellNotFoundException, WorkSheetNotFoundException
public boolean removeName(Name n)
n - public void addLocalName(Name name)
bookNameRecs - public void removeLocalName(Name name)
bookNameRecs - public void updateNameIlbls()
public void removeWorkSheet(Boundsheet sheet)
public Boundsheet getWorkSheetByName(String bstr) throws WorkSheetNotFoundException
String - name of BoundsheetWorkSheetNotFoundExceptionpublic Boundsheet getWorkSheetByHash(String s) throws WorkSheetNotFoundException
String - hashname of BoundsheetWorkSheetNotFoundExceptionpublic Boundsheet getWorkSheetByNumber(int i) throws WorkSheetNotFoundException
int - index of BoundsheetWorkSheetNotFoundExceptionpublic Sst getSharedStringTable()
public AbstractList getSheetVect()
public void setFirstBof(Bof b)
setFirstBof in interface BookBoundsheetpublic String toString()
public String getFileName()
getFileName in interface Bookpublic boolean showSheetTabs()
public void setShowSheetTabs(boolean show)
public void setFirstVisibleSheet(Boundsheet bs2)
public Xf getXf(int i)
public int getNumXfs()
public void removeXfRecs()
public void updateFormatCache(Xf xf)
xf - FormatHandle.updateXf,
WorkBook.addXfpublic HashMap getFormatCache()
FormatHandle.updateXfpublic ByteStreamer getStreamer()
getStreamer in interface Bookpublic void setSubStream(ByteStreamer s)
public int stream(OutputStream _out)
public WorkBookFactory getFactory()
getFactory in interface Bookpublic void copyWorkSheet(String SourceSheetName, String NewSheetName) throws Exception
Exceptionpublic void insertName(Name n)
n - public void copyChartToSheet(String chartname, String sheetname) throws ChartNotFoundException, WorkSheetNotFoundException
chartname - sheetname - ChartNotFoundExceptionWorkSheetNotFoundExceptionpublic Chart addChart(Chart destChart, String NewChartName, Boundsheet boundsht)
public void addChartUpdateMsodg(MSODrawing mso, Boundsheet sht)
mso - Msodrawing record that is being added or copiedsht - Boundsheetpublic void addPreChart()
public void deleteChart(String chartname, Boundsheet sheet) throws ChartNotFoundException
ChartNotFoundExceptionpublic void addBoundsheet(byte[] inbytes,
String origSheetName,
String NewSheetName,
String origWorkBookName,
boolean SSTPopulatedBoundsheet)
throws IOException,
ClassNotFoundException
inbytes - original sheet bytesNewSheetName - new Sheet NameorigWorkBookName - original WorkBook Name (nec. for resolving possible external references) *ClassNotFoundExceptionIOExceptionpublic void changeWorkSheetOrder(Boundsheet bs, int idx)
public void addBoundsheet(Boundsheet bound, String origSheetName, String newSheetName, String origWorkBookName, boolean SSTPopulatedBoundsheet)
bound - new (copied) sheetnewSheetName - new sheetnameorigWorkBookName - original WorkBook Name (nec. for resolving possible external references) *public void setStringEncodingMode(int mode)
public void setDupeStringMode(int mode)
public Chart getChart(String chartname) throws ChartNotFoundException
ChartNotFoundExceptionpublic void removeChart(String chartname) throws ChartNotFoundException
chartname - ChartNotFoundExceptionpublic int addPivotStream(String ref, String sheetName, int sid)
ref - String reference: either reference or named rangesheetName - String sheetnamecacheid - if > 0, the desired cacheid (useful only in OOXML parsing)public void addPivotCache(String ref, WorkBookHandle wbh, int sId)
ref - Cell Range which identifies pivot table data rangewbh - sId - Stream or cachid Id -- links back to SxStream set of recordspublic SxStreamID getPivotStream(int cacheid)
cacheid - public AbstractList getHlinklookup()
public AbstractList getMergecelllookup()
public void addIndirectFormula(Formula f)
public void initializeIndirectFormulas()
public void addExternsheet()
public void setCalcMode(int mode)
CalcMode - WorkBookHandle.setFormulaCalculationMode()public int getCalcMode()
CalcMode - WorkBookHandle.setFormulaCalculationMode()public AbstractList getXfrecs()
public AbstractList getFontRecs()
public Map getXfrecsAsString()
public Map getFontRecsAsXML()
public Boundsheet getLastbound()
public void setLastbound(Boundsheet lastbound)
lastbound - The lastbound to set.public void addFormula(Formula rec)
rec - public boolean isSharedupes()
public void setSharedupes(boolean sharedupes)
@Deprecated public boolean is1904()
getDateFormat() instead.public DateConverter.DateFormat getDateFormat()
public ReferenceTracker getRefTracker()
public void setIsExcel2007(boolean b)
b - public boolean getIsExcel2007()
public String getCodename()
public boolean defaultLanguageIsDBCS()
Language Country code Countries/regions
-------------------------------------------------------------
Arabic 966 (Saudi Arabia)
Czech 42 (Czech Republic)
Danish 45 (Denmark)
Dutch 31 (The Netherlands)
English 1 (The United States of America)
Farsi 98 (Iran)
Finnish 358 (Finland)
French 33 (France)
German 49 (Germany)
Greek 30 (Greece)
Hebrew 972 (Israel)
Hungarian 36 (Hungary)
Indian 91 (India)
Italian 39 (Italy)
Japanese 81 (Japan)
Korean 82 (Korea)
Norwegian 47 (Norway)
Polish 48 (Poland)
Portuguese (Brazil) 55 (Brazil)
Portuguese 351 (Portugal)
Russian 7 (Russian Federation)
Simplified Chinese 86 (People's Republic of China)
Spanish 34 (Spain)
Swedish 46 (Sweden)
Thai 66 (Thailand)
Traditional Chinese 886 (Taiwan)
Turkish 90 (Turkey)
Urdu 92 (Pakistan)
Vietnamese 84 (Vietnam)
public void setCodename(String s)
s - public void setFirstSheet(int f)
f - public int getFirstSheet()
public void setDxfs(ArrayList dxfs)
public ArrayList getDxfs()
public String[] getAllStrings()
public void setPivotCache(PivotCache pc)
pc - initialized pivot cachepublic PivotCache getPivotCache()
public void closeSheets()
protected void closeRecords()
public void close()
public Color[] getColorTable()
public void setColorTable(Color[] clrtable)
public int getDefaultIxfe()
public void setDefaultIxfe(int defaultIxfe)
public int getCalcId()
public void setCalcId(int i)
Copyright © 2002–2019 Starter Inc.. All rights reserved.