public class XSSFEventBasedExcelExtractor extends org.apache.poi.ooxml.extractor.POIXMLTextExtractor implements ExcelExtractor
| Constructor and Description |
|---|
XSSFEventBasedExcelExtractor(OPCPackage container) |
XSSFEventBasedExcelExtractor(String path) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Allows to free resources of the Extractor as soon as
it is not needed any more.
|
org.apache.poi.ooxml.POIXMLProperties.CoreProperties |
getCoreProperties()
Returns the core document properties
|
org.apache.poi.ooxml.POIXMLProperties.CustomProperties |
getCustomProperties()
Returns the custom document properties
|
org.apache.poi.ooxml.POIXMLProperties.ExtendedProperties |
getExtendedProperties()
Returns the extended document properties
|
boolean |
getFormulasNotResults() |
boolean |
getIncludeCellComments() |
boolean |
getIncludeHeadersFooters() |
boolean |
getIncludeSheetNames() |
boolean |
getIncludeTextBoxes() |
Locale |
getLocale() |
OPCPackage |
getPackage()
Returns the opened OPCPackage container.
|
String |
getText()
Processes the file and returns the text
|
static void |
main(String[] args) |
void |
processSheet(XSSFSheetXMLHandler.SheetContentsHandler sheetContentsExtractor,
Styles styles,
Comments comments,
SharedStrings strings,
InputStream sheetInputStream)
Processes the given sheet
|
void |
setConcatenatePhoneticRuns(boolean concatenatePhoneticRuns)
Concatenate text from <rPh> text elements in SharedStringsTable
Default is true;
|
void |
setFormulasNotResults(boolean formulasNotResults)
Should we return the formula itself, and not
the result it produces? Default is false
|
void |
setIncludeCellComments(boolean includeCellComments)
Should cell comments be included? Default is false
|
void |
setIncludeHeadersFooters(boolean includeHeadersFooters)
Should headers and footers be included? Default is true
|
void |
setIncludeSheetNames(boolean includeSheetNames)
Should sheet names be included? Default is true
|
void |
setIncludeTextBoxes(boolean includeTextBoxes)
Should text from textboxes be included? Default is true
|
void |
setLocale(Locale locale) |
getDocument, getMetadataTextExtractorsetFilesystempublic XSSFEventBasedExcelExtractor(String path) throws XmlException, OpenXML4JException, IOException
public XSSFEventBasedExcelExtractor(OPCPackage container) throws XmlException, OpenXML4JException, IOException
public void setIncludeSheetNames(boolean includeSheetNames)
setIncludeSheetNames in interface ExcelExtractorincludeSheetNames - true if the sheet names should be includedpublic boolean getIncludeSheetNames()
public void setFormulasNotResults(boolean formulasNotResults)
setFormulasNotResults in interface ExcelExtractorformulasNotResults - true if the formula itself is returnedpublic boolean getFormulasNotResults()
public void setIncludeHeadersFooters(boolean includeHeadersFooters)
setIncludeHeadersFooters in interface ExcelExtractorincludeHeadersFooters - true if headers and footers should be includedpublic boolean getIncludeHeadersFooters()
public void setIncludeTextBoxes(boolean includeTextBoxes)
public boolean getIncludeTextBoxes()
public void setIncludeCellComments(boolean includeCellComments)
setIncludeCellComments in interface ExcelExtractorincludeCellComments - true if cell comments should be includedpublic boolean getIncludeCellComments()
public void setConcatenatePhoneticRuns(boolean concatenatePhoneticRuns)
concatenatePhoneticRuns - true if runs should be concatenated, false otherwisepublic void setLocale(Locale locale)
public Locale getLocale()
public OPCPackage getPackage()
getPackage in class org.apache.poi.ooxml.extractor.POIXMLTextExtractorpublic org.apache.poi.ooxml.POIXMLProperties.CoreProperties getCoreProperties()
getCoreProperties in class org.apache.poi.ooxml.extractor.POIXMLTextExtractorpublic org.apache.poi.ooxml.POIXMLProperties.ExtendedProperties getExtendedProperties()
getExtendedProperties in class org.apache.poi.ooxml.extractor.POIXMLTextExtractorpublic org.apache.poi.ooxml.POIXMLProperties.CustomProperties getCustomProperties()
getCustomProperties in class org.apache.poi.ooxml.extractor.POIXMLTextExtractorpublic void processSheet(XSSFSheetXMLHandler.SheetContentsHandler sheetContentsExtractor, Styles styles, Comments comments, SharedStrings strings, InputStream sheetInputStream) throws IOException, SAXException
IOExceptionSAXExceptionpublic String getText()
getText in interface ExcelExtractorgetText in class POITextExtractorpublic void close()
throws IOException
POITextExtractorclose in interface Closeableclose in interface AutoCloseableclose in class org.apache.poi.ooxml.extractor.POIXMLTextExtractorIOExceptionCopyright © 2010 - 2020 Adobe. All Rights Reserved