public class OOXMLReader extends OOXMLAdapter implements OOXMLConstants
| Modifier and Type | Field and Description |
|---|---|
protected static boolean |
parsePivotTables |
DEBUGborderStyle, builtInNames, cellFormulaType, cellType, chartDir, chartns, contentTypes, drawingDir, drawingmlns, drawingns, fontFamily, fontScheme, horizontalAlignment, legendPos, mediaDir, patternFill, pkgrelns, relns, relsContentTypes, systemColors, themeDir, threeDchartTypes, twoDchartTypes, typens, verticalAlignment, xmlHeader, xmlns| Constructor and Description |
|---|
OOXMLReader() |
| Modifier and Type | Method and Description |
|---|---|
protected static String |
getCurrentElement(org.xmlpull.v1.XmlPullParser xpp)
retrieves the entire element at the current position in the xpp pullparser,
as a string, and advances the pullparser position to the next element
|
protected static String |
getInlineString(org.xmlpull.v1.XmlPullParser xpp)
XmlPullParser positioned on
|
protected static void |
handlePassThroughs(ZipFile zip,
WorkBookHandle bk,
String parentDir,
String externalDir,
String[] c)
pass-through current OOXML element/file - i.e.
|
protected static void |
handleSheetPassThroughs(ZipFile zip,
WorkBookHandle bk,
Boundsheet sht,
String parentDir,
String externalDir,
String[] c,
String attrs)
pass-through current sheet-level OOXML element/file - i.e.
|
protected void |
parseBookLevelElements(WorkBookHandle bk,
WorkSheetHandle sheet,
ZipFile zip,
ArrayList cl,
String parentDir,
ArrayList formulas,
ArrayList hyperlinks,
HashMap inlineStrs,
HashMap<String,String> pivotCaches,
HashMap<String,WorkSheetHandle> pivotTables)
parses OOXML content files given a content list cl from zip file zip
recurses if content file has it's own content
*************************************
NOTE: certain elements we do not as of yet process; we "pass-through" or store such elements along with any embedded objects associated with them
for example, activeX objects, vbaProject.bin, etc.
|
void |
parseNBind(WorkBookHandle bk,
String fName)
OOXML parseNBind - reads in an OOXML (Excel 7) workbook
|
protected static String |
parsePathForZip(String p,
String parentDir)
get correct path for zip access based on path p and parent directory parentDir
|
protected static void |
passThrough(ZipFile zip,
String fin,
String fout)
handle OOXML files that we do not process at this time.
|
static void |
refreshExternalFiles(ZipFile zipIn,
String externalDir)
retrieve pass-through files (Files not processed by normal WBH channels) for later writing
|
protected CellHandle |
sheetAdd(WorkSheetHandle sheet,
Object val,
Object cachedval,
int r,
int c,
int fmtid)
intercept Sheet adds and hand off to parse event listener as needed
|
protected static String[] |
storeEmbeds(ZipFile zip,
ZipEntry target,
String p,
String externalDir)
take a passthrough element such as vmldrawing or theme which contains embedded objects (images), retrieve and store
for later re-writing to zip
|
addDeferredFile, addDeferredFile, addDeferredFile, cloneStack, deleteDir, getContentType, getEntry, getExOOXMLFileName, getFilename, getFormat, getNextText, getRelationshipType, getRelationshipTypeAbbrev, getStandaloneChartDrawingOOXML, getTempDir, hasMacros, nextZipEntry, parseBoolean, parseRels, refreshPassThroughFiles, reorderWbContentList, setFormat, sortSheets, stripNonAscii, stripNonAsciiRetainQuote, wrapInputStream, writeFileToZIP, writeSBToStreamEfficientlypublic void parseNBind(WorkBookHandle bk, String fName) throws org.xmlpull.v1.XmlPullParserException, IOException, CellNotFoundException
bk - WorkBookHandle - workbook to inputfName - OOXML filename (must be a ZIP file in OPC format)org.xmlpull.v1.XmlPullParserExceptionIOExceptionCellNotFoundExceptionprotected void parseBookLevelElements(WorkBookHandle bk, WorkSheetHandle sheet, ZipFile zip, ArrayList cl, String parentDir, ArrayList formulas, ArrayList hyperlinks, HashMap inlineStrs, HashMap<String,String> pivotCaches, HashMap<String,WorkSheetHandle> pivotTables) throws org.xmlpull.v1.XmlPullParserException, CellNotFoundException
bk - WorkBookHandlesheet - WorkSheetHandle (set if recursing)zip - currently open ZipOutputStreamcl - ArrayList of Contents (type, filename, rId) to parseparentDir - Parent Directory for relative paths in content listsformulas, - hyperlinks, inlineStrs -- ArrayLists/Hashmaps stores sheet-specific info for later entryCellNotFoundExceptionorg.xmlpull.v1.XmlPullParserExceptionprotected static void handlePassThroughs(ZipFile zip, WorkBookHandle bk, String parentDir, String externalDir, String[] c) throws IOException
c - String[] {type, filename, rid}IOExceptionprotected static void handleSheetPassThroughs(ZipFile zip, WorkBookHandle bk, Boundsheet sht, String parentDir, String externalDir, String[] c, String attrs) throws IOException
c - String[] {type, filename, rid}IOExceptionprotected static void passThrough(ZipFile zip, String fin, String fout) throws IOException
zip - fin - fout - IOExceptionprotected static String parsePathForZip(String p, String parentDir)
p - parentDir - protected static String getCurrentElement(org.xmlpull.v1.XmlPullParser xpp)
xpp - protected static String getInlineString(org.xmlpull.v1.XmlPullParser xpp) throws org.xmlpull.v1.XmlPullParserException, IOException
xpp - XmlPullParserorg.xmlpull.v1.XmlPullParserExceptionIOExceptionprotected static String[] storeEmbeds(ZipFile zip, ZipEntry target, String p, String externalDir) throws IOException
zip - open ZipFiletarget - ZipEntry pointing to .relsp - pathIOExceptionprotected CellHandle sheetAdd(WorkSheetHandle sheet, Object val, Object cachedval, int r, int c, int fmtid)
Copyright © 2002–2019 Starter Inc.. All rights reserved.