org.apache.poi.xssf.extractor
Class XSSFExcelExtractor

java.lang.Object
  extended by org.apache.poi.POITextExtractor
      extended by org.apache.poi.POIXMLTextExtractor
          extended by org.apache.poi.xssf.extractor.XSSFExcelExtractor
All Implemented Interfaces:
org.apache.poi.ss.extractor.ExcelExtractor

public class XSSFExcelExtractor
extends POIXMLTextExtractor
implements org.apache.poi.ss.extractor.ExcelExtractor

Helper class to extract text from an OOXML Excel file


Field Summary
 
Fields inherited from class org.apache.poi.POIXMLTextExtractor
document
 
Constructor Summary
XSSFExcelExtractor(org.openxml4j.opc.Package container)
           
XSSFExcelExtractor(java.lang.String path)
           
XSSFExcelExtractor(XSSFWorkbook workbook)
           
 
Method Summary
 java.lang.String getText()
          Retreives the text contents of the file
static void main(java.lang.String[] args)
           
 void setFormulasNotResults(boolean formulasNotResults)
          Should we return the formula itself, and not the result it produces? Default is false
 void setIncludeCellComments(boolean includeCellComments)
          Should cell comments be included? Default is true
 void setIncludeSheetNames(boolean includeSheetNames)
          Should sheet names be included? Default is true
 
Methods inherited from class org.apache.poi.POIXMLTextExtractor
getCoreProperties, getCustomProperties, getDocument, getExtendedProperties, getMetadataTextExtractor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSSFExcelExtractor

public XSSFExcelExtractor(java.lang.String path)
                   throws org.apache.xmlbeans.XmlException,
                          org.openxml4j.exceptions.OpenXML4JException,
                          java.io.IOException
Throws:
org.apache.xmlbeans.XmlException
org.openxml4j.exceptions.OpenXML4JException
java.io.IOException

XSSFExcelExtractor

public XSSFExcelExtractor(org.openxml4j.opc.Package container)
                   throws org.apache.xmlbeans.XmlException,
                          org.openxml4j.exceptions.OpenXML4JException,
                          java.io.IOException
Throws:
org.apache.xmlbeans.XmlException
org.openxml4j.exceptions.OpenXML4JException
java.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:
setIncludeSheetNames in interface org.apache.poi.ss.extractor.ExcelExtractor

setFormulasNotResults

public void setFormulasNotResults(boolean formulasNotResults)
Should we return the formula itself, and not the result it produces? Default is false

Specified by:
setFormulasNotResults in interface org.apache.poi.ss.extractor.ExcelExtractor

setIncludeCellComments

public void setIncludeCellComments(boolean includeCellComments)
Should cell comments be included? Default is true

Specified by:
setIncludeCellComments in interface org.apache.poi.ss.extractor.ExcelExtractor

getText

public java.lang.String getText()
Retreives the text contents of the file

Specified by:
getText in interface org.apache.poi.ss.extractor.ExcelExtractor
Specified by:
getText in class POITextExtractor
Returns:
All the text from the document


Copyright 2008 The Apache Software Foundation or its licensors, as applicable.