public class OldExcelExtractor extends Object implements POITextExtractor
Returns much (but not all) of the textual content of the file, suitable for indexing by something like Apache Lucene, or used by Apache Tika, but not really intended for display to the user.
| Constructor and Description |
|---|
OldExcelExtractor(DirectoryNode directory) |
OldExcelExtractor(File f) |
OldExcelExtractor(InputStream input) |
OldExcelExtractor(POIFSFileSystem fs) |
| Modifier and Type | Method and Description |
|---|---|
int |
getBiffVersion()
The Biff version, largely corresponding to the Excel version
|
Object |
getDocument() |
Closeable |
getFilesystem() |
int |
getFileType()
The kind of the file, one of
BOFRecord.TYPE_WORKSHEET,
BOFRecord.TYPE_CHART, BOFRecord.TYPE_EXCEL_4_MACRO
or BOFRecord.TYPE_WORKSPACE_FILE |
POITextExtractor |
getMetadataTextExtractor()
Returns another text extractor, which is able to
output the textual content of the document
metadata / properties, such as author and title.
|
String |
getText()
Retrieves the text contents of the file, as best we can
for these old file formats
|
protected void |
handleNumericCell(StringBuilder text,
double value) |
boolean |
isCloseFilesystem() |
static void |
main(String[] args) |
void |
setCloseFilesystem(boolean doCloseFilesystem) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclosepublic OldExcelExtractor(InputStream input) throws IOException
IOExceptionpublic OldExcelExtractor(File f) throws IOException
IOExceptionpublic OldExcelExtractor(POIFSFileSystem fs) throws IOException
IOExceptionpublic OldExcelExtractor(DirectoryNode directory) throws IOException
IOExceptionpublic static void main(String[] args) throws IOException
IOExceptionpublic int getBiffVersion()
public int getFileType()
BOFRecord.TYPE_WORKSHEET,
BOFRecord.TYPE_CHART, BOFRecord.TYPE_EXCEL_4_MACRO
or BOFRecord.TYPE_WORKSPACE_FILEpublic String getText()
getText in interface POITextExtractorprotected void handleNumericCell(StringBuilder text, double value)
public POITextExtractor getMetadataTextExtractor()
POITextExtractorgetMetadataTextExtractor in interface POITextExtractorpublic void setCloseFilesystem(boolean doCloseFilesystem)
setCloseFilesystem in interface POITextExtractordoCloseFilesystem - true (default), if underlying resources/filesystem should be
closed on POITextExtractor.close()public boolean isCloseFilesystem()
isCloseFilesystem in interface POITextExtractortrue, if resources/filesystem should be closed on POITextExtractor.close()public Closeable getFilesystem()
getFilesystem in interface POITextExtractorpublic Object getDocument()
getDocument in interface POITextExtractor