|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.poi.POITextExtractor
org.apache.poi.POIXMLTextExtractor
org.apache.poi.xssf.extractor.XSSFEventBasedExcelExtractor
public class XSSFEventBasedExcelExtractor
Implementation of a text extractor from OOXML Excel files that uses SAX event based parsing.
| Nested Class Summary | |
|---|---|
protected class |
XSSFEventBasedExcelExtractor.SheetTextExtractor
|
| Constructor Summary | |
|---|---|
XSSFEventBasedExcelExtractor(OPCPackage container)
|
|
XSSFEventBasedExcelExtractor(java.lang.String path)
|
|
| Method Summary | |
|---|---|
void |
close()
Allows to free resources of the Extractor as soon as it is not needed any more. |
POIXMLProperties.CoreProperties |
getCoreProperties()
Returns the core document properties |
POIXMLProperties.CustomProperties |
getCustomProperties()
Returns the custom document properties |
POIXMLProperties.ExtendedProperties |
getExtendedProperties()
Returns the extended document properties |
OPCPackage |
getPackage()
Returns the opened OPCPackage container. |
java.lang.String |
getText()
Processes the file and returns the text |
static void |
main(java.lang.String[] args)
|
void |
processSheet(XSSFSheetXMLHandler.SheetContentsHandler sheetContentsExtractor,
StylesTable styles,
CommentsTable comments,
ReadOnlySharedStringsTable strings,
java.io.InputStream sheetInputStream)
Processes the given sheet |
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(java.util.Locale locale)
|
| Methods inherited from class org.apache.poi.POIXMLTextExtractor |
|---|
getDocument, getMetadataTextExtractor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XSSFEventBasedExcelExtractor(java.lang.String path)
throws org.apache.xmlbeans.XmlException,
OpenXML4JException,
java.io.IOException
org.apache.xmlbeans.XmlException
OpenXML4JException
java.io.IOException
public XSSFEventBasedExcelExtractor(OPCPackage container)
throws org.apache.xmlbeans.XmlException,
OpenXML4JException,
java.io.IOException
org.apache.xmlbeans.XmlException
OpenXML4JException
java.io.IOException| Method Detail |
|---|
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exceptionpublic void setIncludeSheetNames(boolean includeSheetNames)
setIncludeSheetNames in interface ExcelExtractorpublic void setFormulasNotResults(boolean formulasNotResults)
setFormulasNotResults in interface ExcelExtractorpublic void setIncludeHeadersFooters(boolean includeHeadersFooters)
setIncludeHeadersFooters in interface ExcelExtractorpublic void setIncludeTextBoxes(boolean includeTextBoxes)
public void setIncludeCellComments(boolean includeCellComments)
setIncludeCellComments in interface ExcelExtractorpublic void setLocale(java.util.Locale locale)
public OPCPackage getPackage()
getPackage in class POIXMLTextExtractorpublic POIXMLProperties.CoreProperties getCoreProperties()
getCoreProperties in class POIXMLTextExtractorpublic POIXMLProperties.ExtendedProperties getExtendedProperties()
getExtendedProperties in class POIXMLTextExtractorpublic POIXMLProperties.CustomProperties getCustomProperties()
getCustomProperties in class POIXMLTextExtractor
public void processSheet(XSSFSheetXMLHandler.SheetContentsHandler sheetContentsExtractor,
StylesTable styles,
CommentsTable comments,
ReadOnlySharedStringsTable strings,
java.io.InputStream sheetInputStream)
throws java.io.IOException,
org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXExceptionpublic java.lang.String getText()
getText in interface ExcelExtractorgetText in class POITextExtractor
public void close()
throws java.io.IOException
POITextExtractor
close in interface java.io.Closeableclose in class POIXMLTextExtractorjava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||