org.apache.poi.hssf.extractor
Class ExcelExtractor
java.lang.Object
org.apache.poi.POITextExtractor
org.apache.poi.POIOLE2TextExtractor
org.apache.poi.hssf.extractor.ExcelExtractor
- All Implemented Interfaces:
- org.apache.poi.ss.extractor.ExcelExtractor
public class ExcelExtractor
- extends POIOLE2TextExtractor
- implements org.apache.poi.ss.extractor.ExcelExtractor
A text extractor for Excel files.
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
- See Also:
XLS2CSVmra
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExcelExtractor
public ExcelExtractor(HSSFWorkbook wb)
ExcelExtractor
public ExcelExtractor(POIFSFileSystem fs)
throws java.io.IOException
- Throws:
java.io.IOException
ExcelExtractor
public ExcelExtractor(DirectoryNode dir,
POIFSFileSystem fs)
throws java.io.IOException
- Throws:
java.io.IOException
setIncludeSheetNames
public void setIncludeSheetNames(boolean includeSheetNames)
- Should sheet names be included? Default is true
- Specified by:
setIncludeSheetNames
in interface org.apache.poi.ss.extractor.ExcelExtractor
setFormulasNotResults
public void setFormulasNotResults(boolean formulasNotResults)
- Should we return the formula itself, and not
the result it produces? Default is false
- Specified by:
setFormulasNotResults
in interface org.apache.poi.ss.extractor.ExcelExtractor
setIncludeCellComments
public void setIncludeCellComments(boolean includeCellComments)
- Should cell comments be included? Default is false
- Specified by:
setIncludeCellComments
in interface org.apache.poi.ss.extractor.ExcelExtractor
getText
public java.lang.String getText()
- Retreives the text contents of the file
- Specified by:
getText
in interface org.apache.poi.ss.extractor.ExcelExtractor
- Specified by:
getText
in class POITextExtractor
- Returns:
- All the text from the document
_extractHeaderFooter
public static java.lang.String _extractHeaderFooter(HeaderFooter hf)
Copyright 2008 The Apache Software Foundation or
its licensors, as applicable.