org.apache.any23.plugin.officescraper

## Class ExcelExtractor

- java.lang.Object
- - org.apache.any23.plugin.officescraper.ExcelExtractor

- All Implemented Interfaces:
    Extractor<InputStream>, Extractor.ContentExtractor

      public class ExcelExtractor
      extends Object
      implements Extractor.ContentExtractor

  Implementation of `Extractor.ContentExtractor` able to process a MS Excel 97-2007+ file format .xls/.xlsx and convert the detected content to triples. This extractor is based on Apache POI-HSSF and POI-XSSF Java API.
  Author:
    Michele Mostarda (mostarda@fbk.eu)

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.any23.extractor.Extractor

      `Extractor.BlindExtractor, Extractor.ContentExtractor, Extractor.TagSoupDOMExtractor`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExcelExtractor()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ExtractorDescription` | `getDescription()` Returns a `ExtractorDescription` of this extractor.
    `boolean` | `isStopAtFirstError()`
    `void` | `run(ExtractionParameters extractionParameters, ExtractionContext context, InputStream in, ExtractionResult er)` Executes the extractor.
    `void` | `setStopAtFirstError(boolean f)` If `true`, the extractor will stop at first parsing error, if`false` the extractor will attempt to ignore all parsing errors.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ExcelExtractor

          public ExcelExtractor()

  - ### Method Detail

    - #### isStopAtFirstError

          public boolean isStopAtFirstError()

    - #### setStopAtFirstError

          public void setStopAtFirstError(boolean f)

      Description copied from interface: `Extractor.ContentExtractor`
      If `true`, the extractor will stop at first parsing error, if`false` the extractor will attempt to ignore all parsing errors.
      Specified by:
        `setStopAtFirstError` in interface `Extractor.ContentExtractor`
      Parameters:
        `f` - tolerance flag.

    - #### getDescription

          public ExtractorDescription getDescription()

      Description copied from interface: `Extractor`
      Returns a `ExtractorDescription` of this extractor.
      Specified by:
        `getDescription` in interface `Extractor<InputStream>`
      Returns:
        the object representing the extractor description.

    - #### run

          public void run(ExtractionParameters extractionParameters,
                          ExtractionContext context,
                          InputStream in,
                          ExtractionResult er)
                   throws IOException,
                          ExtractionException

      Description copied from interface: `Extractor`
      Executes the extractor. Will be invoked only once, extractors are not reusable.
      Specified by:
        `run` in interface `Extractor<InputStream>`
      Parameters:
        `extractionParameters` - the parameters to be applied during the extraction.
        `context` - The document context.
        `in` - The extractor input data.
        `er` - the collector for the extracted data.
      Throws:
        `IOException` - On error while reading from the input stream.
        `ExtractionException` - On other error, such as parse errors.

Copyright © 2010–2019 The Apache Software Foundation. All rights reserved.