org.apache.poi.hssf.extractor
Class EventBasedExcelExtractor
- java.lang.Object
-
- org.apache.poi.POITextExtractor
-
- org.apache.poi.POIOLE2TextExtractor
-
- org.apache.poi.hssf.extractor.EventBasedExcelExtractor
-
- All Implemented Interfaces:
- java.io.Closeable, java.lang.AutoCloseable, ExcelExtractor
public class EventBasedExcelExtractor extends POIOLE2TextExtractor implements ExcelExtractor
A text extractor for Excel files, that is based on the HSSF EventUserModel API. It will typically use less memory thanExcelExtractor, but may not provide the same richness of formatting. Returns the textual content of the file, suitable for indexing by something like Lucene, but not really intended for display to the user.To turn an excel file into a CSV or similar, then see the XLS2CSVmra example
http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java
-
-
Constructor Summary
Constructors Constructor and Description EventBasedExcelExtractor(DirectoryNode dir)EventBasedExcelExtractor(DirectoryNode dir, POIFSFileSystem fs)Deprecated.UseEventBasedExcelExtractor(DirectoryNode)insteadEventBasedExcelExtractor(POIFSFileSystem fs)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description DocumentSummaryInformationgetDocSummaryInformation()Would return the document information metadata for the document, if we supported itPOIFSFileSystemgetFileSystem()Deprecated.UsePOIOLE2TextExtractor.getRoot()insteadSummaryInformationgetSummaryInformation()Would return the summary information metadata for the document, if we supported itjava.lang.StringgetText()Retreives the text contents of the filevoidsetFormulasNotResults(boolean formulasNotResults)Should we return the formula itself, and not the result it produces? Default is falsevoidsetIncludeCellComments(boolean includeComments)Would control the inclusion of cell comments from the document, if we supported itvoidsetIncludeHeadersFooters(boolean includeHeadersFooters)Would control the inclusion of headers and footers from the document, if we supported itvoidsetIncludeSheetNames(boolean includeSheetNames)Should sheet names be included? Default is true-
Methods inherited from class org.apache.poi.POIOLE2TextExtractor
getMetadataTextExtractor, getRoot
-
Methods inherited from class org.apache.poi.POITextExtractor
close
-
-
-
-
Constructor Detail
-
EventBasedExcelExtractor
@Deprecated public EventBasedExcelExtractor(DirectoryNode dir, POIFSFileSystem fs)
Deprecated. UseEventBasedExcelExtractor(DirectoryNode)instead
-
EventBasedExcelExtractor
public EventBasedExcelExtractor(DirectoryNode dir)
-
EventBasedExcelExtractor
public EventBasedExcelExtractor(POIFSFileSystem fs)
-
-
Method Detail
-
getFileSystem
public POIFSFileSystem getFileSystem()
Deprecated. UsePOIOLE2TextExtractor.getRoot()insteadReturn the underlying POIFS FileSystem of this document.- Overrides:
getFileSystemin classPOIOLE2TextExtractor- Returns:
- the POIFSFileSystem that is associated with the POIDocument of this extractor.
-
getDocSummaryInformation
public DocumentSummaryInformation getDocSummaryInformation()
Would return the document information metadata for the document, if we supported it- Overrides:
getDocSummaryInformationin classPOIOLE2TextExtractor- Returns:
- The Document Summary Information or null if it could not be read for this document.
-
getSummaryInformation
public SummaryInformation getSummaryInformation()
Would return the summary information metadata for the document, if we supported it- Overrides:
getSummaryInformationin classPOIOLE2TextExtractor- Returns:
- The Summary information for the document or null if it could not be read for this document.
-
setIncludeCellComments
public void setIncludeCellComments(boolean includeComments)
Would control the inclusion of cell comments from the document, if we supported it- Specified by:
setIncludeCellCommentsin interfaceExcelExtractor
-
setIncludeHeadersFooters
public void setIncludeHeadersFooters(boolean includeHeadersFooters)
Would control the inclusion of headers and footers from the document, if we supported it- Specified by:
setIncludeHeadersFootersin interfaceExcelExtractor
-
setIncludeSheetNames
public void setIncludeSheetNames(boolean includeSheetNames)
Should sheet names be included? Default is true- Specified by:
setIncludeSheetNamesin interfaceExcelExtractor
-
setFormulasNotResults
public void setFormulasNotResults(boolean formulasNotResults)
Should we return the formula itself, and not the result it produces? Default is false- Specified by:
setFormulasNotResultsin interfaceExcelExtractor
-
getText
public java.lang.String getText()
Retreives the text contents of the file- Specified by:
getTextin interfaceExcelExtractor- Specified by:
getTextin classPOITextExtractor- Returns:
- All the text from the document
-
-
DataMelt 3.0 © DataMelt by jWork.ORG