Class WorkBookReader<T>

java.lang.Object
com.github.cla9.excel.reader.worker.ExcelReader<T>
com.github.cla9.excel.reader.worker.WorkBookReader<T>
Type Parameters:
T - the type parameter
All Implemented Interfaces:
Reader<T>

public class WorkBookReader<T>
extends ExcelReader<T>
The type Work book reader.
  • Field Summary

    Fields inherited from class com.github.cla9.excel.reader.worker.ExcelReader

    entityParser, sheetName, tClass
  • Constructor Summary

    Constructors 
    Constructor Description
    WorkBookReader​(java.lang.Class<T> tClass)
    Instantiates a new Work book reader.
    WorkBookReader​(java.lang.Class<T> tClass, ExcelMetaModel excelMetaModel)
    Instantiates a new Work book reader.
    WorkBookReader​(java.lang.Class<T> tClass, java.lang.String sheetName)
    Instantiates a new Work book reader.
    WorkBookReader​(java.lang.Class<T> tClass, java.lang.String sheetName, ExcelMetaModel excelMetaModel)
    Instantiates a new Work book reader.
  • Method Summary

    Modifier and Type Method Description
    ExcelResultSet<T> createResultSet​(org.springframework.web.multipart.MultipartFile multipartFile, ExcelMetaModel excelMetaModel, boolean mergedHeaderCheck)
    Create result set excel result set.
    void parseFile​(org.springframework.web.multipart.MultipartFile multipartFile, ExcelMetaModel excelMetaModel, java.util.function.Consumer<T> onSuccessConsumer, java.util.function.Consumer<ExcelRowException> onErrorConsumer, boolean mergedHeaderCheck)
    Parse file.

    Methods inherited from class com.github.cla9.excel.reader.worker.ExcelReader

    createExceptionRow, createResultSet, createResultSet, injectValue, parse, parse

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WorkBookReader

      public WorkBookReader​(java.lang.Class<T> tClass)
      Instantiates a new Work book reader.
      Parameters:
      tClass - the t class
    • WorkBookReader

      public WorkBookReader​(java.lang.Class<T> tClass, java.lang.String sheetName)
      Instantiates a new Work book reader.
      Parameters:
      tClass - the t class
      sheetName - target sheet name
    • WorkBookReader

      public WorkBookReader​(java.lang.Class<T> tClass, ExcelMetaModel excelMetaModel)
      Instantiates a new Work book reader.
      Parameters:
      tClass - the t class
      excelMetaModel - the excel meta model
    • WorkBookReader

      public WorkBookReader​(java.lang.Class<T> tClass, java.lang.String sheetName, ExcelMetaModel excelMetaModel)
      Instantiates a new Work book reader.
      Parameters:
      tClass - the t class
      sheetName - target sheet name
      excelMetaModel - the excel meta model
  • Method Details

    • createResultSet

      public ExcelResultSet<T> createResultSet​(org.springframework.web.multipart.MultipartFile multipartFile, ExcelMetaModel excelMetaModel, boolean mergedHeaderCheck)
      Description copied from class: ExcelReader
      Create result set excel result set.
      Specified by:
      createResultSet in class ExcelReader<T>
      Parameters:
      multipartFile - the multipart file
      excelMetaModel - the metadata
      mergedHeaderCheck - the force merged header refresh
      Returns:
      the excel result set
    • parseFile

      public void parseFile​(org.springframework.web.multipart.MultipartFile multipartFile, ExcelMetaModel excelMetaModel, java.util.function.Consumer<T> onSuccessConsumer, java.util.function.Consumer<ExcelRowException> onErrorConsumer, boolean mergedHeaderCheck)
      Description copied from class: ExcelReader
      Parse file.
      Specified by:
      parseFile in class ExcelReader<T>
      Parameters:
      multipartFile - the multipart file
      excelMetaModel - the excel meta model
      onSuccessConsumer - the on success consumer
      onErrorConsumer - the on error consumer
      mergedHeaderCheck - the force merged header refresh