org.apache.poi.xssf.extractor
Class XSSFExcelExtractor
- java.lang.Object
-
- org.apache.poi.POITextExtractor
-
- org.apache.poi.POIXMLTextExtractor
-
- org.apache.poi.xssf.extractor.XSSFExcelExtractor
-
- All Implemented Interfaces:
- java.io.Closeable, java.lang.AutoCloseable, ExcelExtractor
public class XSSFExcelExtractor extends POIXMLTextExtractor implements ExcelExtractor
Helper class to extract text from an OOXML Excel file
-
-
Field Summary
Fields Modifier and Type Field and Description static XSSFRelation[]SUPPORTED_TYPES
-
Constructor Summary
Constructors Constructor and Description XSSFExcelExtractor(OPCPackage container)XSSFExcelExtractor(java.lang.String path)Deprecated.XSSFExcelExtractor(XSSFWorkbook workbook)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.StringgetText()Retreives the text contents of the filestatic voidmain(java.lang.String[] args)voidsetFormulasNotResults(boolean formulasNotResults)Should we return the formula itself, and not the result it produces? Default is falsevoidsetIncludeCellComments(boolean includeCellComments)Should cell comments be included? Default is falsevoidsetIncludeHeadersFooters(boolean includeHeadersFooters)Should headers and footers be included? Default is truevoidsetIncludeSheetNames(boolean includeSheetNames)Should sheet names be included? Default is truevoidsetIncludeTextBoxes(boolean includeTextBoxes)Should text within textboxes be included? Default is truevoidsetLocale(java.util.Locale locale)What Locale should be used for formatting numbers (based on the styles applied to the cells)-
Methods inherited from class org.apache.poi.POIXMLTextExtractor
close, getCoreProperties, getCustomProperties, getDocument, getExtendedProperties, getMetadataTextExtractor, getPackage
-
-
-
-
Field Detail
-
SUPPORTED_TYPES
public static final XSSFRelation[] SUPPORTED_TYPES
-
-
Constructor Detail
-
XSSFExcelExtractor
public XSSFExcelExtractor(java.lang.String path) throws org.apache.xmlbeans.XmlException, OpenXML4JException, java.io.IOExceptionDeprecated. UseXSSFExcelExtractor(org.apache.poi.openxml4j.opc.OPCPackage)instead.- Throws:
org.apache.xmlbeans.XmlExceptionOpenXML4JExceptionjava.io.IOException
-
XSSFExcelExtractor
public XSSFExcelExtractor(OPCPackage container) throws org.apache.xmlbeans.XmlException, OpenXML4JException, java.io.IOException
- Throws:
org.apache.xmlbeans.XmlExceptionOpenXML4JExceptionjava.io.IOException
-
XSSFExcelExtractor
public XSSFExcelExtractor(XSSFWorkbook workbook)
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception- Throws:
java.lang.Exception
-
setIncludeSheetNames
public void setIncludeSheetNames(boolean includeSheetNames)
Should sheet names be included? Default is true- Specified by:
setIncludeSheetNamesin interfaceExcelExtractor
-
setFormulasNotResults
public void setFormulasNotResults(boolean formulasNotResults)
Should we return the formula itself, and not the result it produces? Default is false- Specified by:
setFormulasNotResultsin interfaceExcelExtractor
-
setIncludeCellComments
public void setIncludeCellComments(boolean includeCellComments)
Should cell comments be included? Default is false- Specified by:
setIncludeCellCommentsin interfaceExcelExtractor
-
setIncludeHeadersFooters
public void setIncludeHeadersFooters(boolean includeHeadersFooters)
Should headers and footers be included? Default is true- Specified by:
setIncludeHeadersFootersin interfaceExcelExtractor
-
setIncludeTextBoxes
public void setIncludeTextBoxes(boolean includeTextBoxes)
Should text within textboxes be included? Default is true- Parameters:
includeTextBoxes-
-
setLocale
public void setLocale(java.util.Locale locale)
What Locale should be used for formatting numbers (based on the styles applied to the cells)
-
getText
public java.lang.String getText()
Retreives the text contents of the file- Specified by:
getTextin interfaceExcelExtractor- Specified by:
getTextin classPOITextExtractor- Returns:
- All the text from the document
-
-
DataMelt 3.0 © DataMelt by jWork.ORG