Package loci.poi.hssf.extractor
Class ExcelExtractor
- java.lang.Object
-
- loci.poi.POITextExtractor
-
- loci.poi.hssf.extractor.ExcelExtractor
-
public class ExcelExtractor extends POITextExtractor
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
-
-
Field Summary
-
Fields inherited from class loci.poi.POITextExtractor
document
-
-
Constructor Summary
Constructors Constructor Description ExcelExtractor(HSSFWorkbook wb)
ExcelExtractor(POIFSFileSystem fs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getText()
Retreives the text contents of the filevoid
setFormulasNotResults(boolean formulasNotResults)
Should we return the formula itself, and not the result it produces? Default is falsevoid
setIncludeSheetNames(boolean includeSheetNames)
Should sheet names be included? Default is true
-
-
-
Constructor Detail
-
ExcelExtractor
public ExcelExtractor(HSSFWorkbook wb)
-
ExcelExtractor
public ExcelExtractor(POIFSFileSystem fs) throws IOException
- Throws:
IOException
-
-
Method Detail
-
setIncludeSheetNames
public void setIncludeSheetNames(boolean includeSheetNames)
Should sheet names be included? Default is true
-
setFormulasNotResults
public void setFormulasNotResults(boolean formulasNotResults)
Should we return the formula itself, and not the result it produces? Default is false
-
getText
public String getText()
Retreives the text contents of the file- Specified by:
getText
in classPOITextExtractor
- Returns:
- All the text from the document
-
-