public class OldExcelExtractor
extends java.lang.Object
implements java.io.Closeable
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(java.io.File f) |
OldExcelExtractor(java.io.InputStream input) |
OldExcelExtractor(POIFSFileSystem fs) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
int |
getBiffVersion()
The Biff version, largely corresponding to the Excel version
|
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 |
java.lang.String |
getText()
Retrieves the text contents of the file, as best we can
for these old file formats
|
protected void |
handleNumericCell(java.lang.StringBuilder text,
double value) |
static void |
main(java.lang.String[] args) |
public OldExcelExtractor(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public OldExcelExtractor(java.io.File f) throws java.io.IOException
java.io.IOException
public OldExcelExtractor(POIFSFileSystem fs) throws java.io.IOException
java.io.IOException
public OldExcelExtractor(DirectoryNode directory) throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException
public int getBiffVersion()
public int getFileType()
BOFRecord.TYPE_WORKSHEET
,
BOFRecord.TYPE_CHART
, BOFRecord.TYPE_EXCEL_4_MACRO
or BOFRecord.TYPE_WORKSPACE_FILE
public java.lang.String getText()
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
protected void handleNumericCell(java.lang.StringBuilder text, double value)
Copyright 2020 The Apache Software Foundation or its licensors, as applicable.