public class ExcelExtractor extends POIOLE2TextExtractor implements ExcelExtractor
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.javadocument| Constructor and Description |
|---|
ExcelExtractor(DirectoryNode dir) |
ExcelExtractor(DirectoryNode dir,
POIFSFileSystem fs)
Deprecated.
Use
ExcelExtractor(DirectoryNode) instead |
ExcelExtractor(HSSFWorkbook wb) |
ExcelExtractor(POIFSFileSystem fs) |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
_extractHeaderFooter(HeaderFooter hf) |
java.lang.String |
getText()
Retrieves the text contents of the file
|
static void |
main(java.lang.String[] args)
Command line extractor.
|
void |
setFormulasNotResults(boolean formulasNotResults)
Should we return the formula itself, and not
the result it produces?
|
void |
setIncludeBlankCells(boolean includeBlankCells)
Should blank cells be output?
|
void |
setIncludeCellComments(boolean includeCellComments)
Should cell comments be included?
|
void |
setIncludeHeadersFooters(boolean includeHeadersFooters)
Should headers and footers be included in the output?
|
void |
setIncludeSheetNames(boolean includeSheetNames)
Should sheet names be included?
|
getDocSummaryInformation, getFileSystem, getMetadataTextExtractor, getRoot, getSummaryInformationclosepublic ExcelExtractor(HSSFWorkbook wb)
public ExcelExtractor(POIFSFileSystem fs) throws java.io.IOException
java.io.IOException@Deprecated public ExcelExtractor(DirectoryNode dir, POIFSFileSystem fs) throws java.io.IOException
ExcelExtractor(DirectoryNode) insteadjava.io.IOExceptionpublic ExcelExtractor(DirectoryNode dir) throws java.io.IOException
java.io.IOExceptionpublic static void main(java.lang.String[] args)
public void setIncludeSheetNames(boolean includeSheetNames)
setIncludeSheetNames in interface ExcelExtractorpublic void setFormulasNotResults(boolean formulasNotResults)
setFormulasNotResults in interface ExcelExtractorpublic void setIncludeCellComments(boolean includeCellComments)
setIncludeCellComments in interface ExcelExtractorpublic void setIncludeBlankCells(boolean includeBlankCells)
public void setIncludeHeadersFooters(boolean includeHeadersFooters)
public java.lang.String getText()
getText in interface ExcelExtractorgetText in class POITextExtractorpublic static java.lang.String _extractHeaderFooter(HeaderFooter hf)
Copyright 2014 The Apache Software Foundation or its licensors, as applicable.