Documentation of 'org.apache.poi.xssf.extractor.XSSFEventBasedExcelExtractor' Java class
XSSFEventBasedExcelExtractor
org.apache.poi.xssf.extractor

Class XSSFEventBasedExcelExtractor

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, ExcelExtractor


    public class XSSFEventBasedExcelExtractor
    extends POIXMLTextExtractor
    implements ExcelExtractor
    Implementation of a text extractor from OOXML Excel files that uses SAX event based parsing.
    • Constructor Detail

      • XSSFEventBasedExcelExtractor

        public XSSFEventBasedExcelExtractor(java.lang.String path)
                                     throws org.apache.xmlbeans.XmlException,
                                            OpenXML4JException,
                                            java.io.IOException
        Throws:
        org.apache.xmlbeans.XmlException
        OpenXML4JException
        java.io.IOException
      • XSSFEventBasedExcelExtractor

        public XSSFEventBasedExcelExtractor(OPCPackage container)
                                     throws org.apache.xmlbeans.XmlException,
                                            OpenXML4JException,
                                            java.io.IOException
        Throws:
        org.apache.xmlbeans.XmlException
        OpenXML4JException
        java.io.IOException
    • 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 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 ExcelExtractor
      • setIncludeHeadersFooters

        public void setIncludeHeadersFooters(boolean includeHeadersFooters)
        Should headers and footers be included? Default is true
        Specified by:
        setIncludeHeadersFooters in interface ExcelExtractor
      • setIncludeTextBoxes

        public void setIncludeTextBoxes(boolean includeTextBoxes)
        Should text from textboxes be included? Default is true
      • setIncludeCellComments

        public void setIncludeCellComments(boolean includeCellComments)
        Should cell comments be included? Default is false
        Specified by:
        setIncludeCellComments in interface ExcelExtractor
      • setLocale

        public void setLocale(java.util.Locale locale)
      • getText

        public java.lang.String getText()
        Processes the file and returns the text
        Specified by:
        getText in interface ExcelExtractor
        Specified by:
        getText in class POITextExtractor
        Returns:
        All the text from the document
      • close

        public void close()
                   throws java.io.IOException
        Description copied from class: POITextExtractor
        Allows to free resources of the Extractor as soon as it is not needed any more. This may include closing open file handles and freeing memory. The Extractor cannot be used after close has been called.
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface java.lang.AutoCloseable
        Overrides:
        close in class POIXMLTextExtractor
        Throws:
        java.io.IOException

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.