com.alibaba.excel

类 EasyExcelFactory

  • 直接已知子类:
    EasyExcel

    public class EasyExcelFactory
    extends Object
    Reader and writer factory class

    Quick start

    Read

    Sample1

    Sample2

    Write

    Sample1

    Sample2

    作者:
    jipengfei
    • 构造器详细资料

      • EasyExcelFactory

        public EasyExcelFactory()
    • 方法详细资料

      • read

        @Deprecated
        public static List<Object> read(InputStream in,
                                                     Sheet sheet)
        已过时。  please use 'EasyExcel.read(in).sheet(sheetNo).doReadSync();'
        Quickly read small files,no more than 10,000 lines.
        参数:
        in - the POI filesystem that contains the Workbook stream.
        sheet - read sheet.
        返回:
        analysis result.
      • readBySax

        @Deprecated
        public static void readBySax(InputStream in,
                                                  Sheet sheet,
                                                  AnalysisEventListener listener)
        已过时。  please use 'EasyExcel.read(in,head,listener).sheet(sheetNo).doRead();'
        Parsing large file
        参数:
        in - the POI filesystem that contains the Workbook stream.
        sheet - read sheet.
        listener - Callback method after each row is parsed.
      • getReader

        @Deprecated
        public static ExcelReader getReader(InputStream in,
                                                         AnalysisEventListener listener)
        已过时。  please use read() build 'ExcelReader'
        Get ExcelReader.
        参数:
        in - the POI filesystem that contains the Workbook stream.
        listener - Callback method after each row is parsed.
        返回:
        ExcelReader.
      • getWriter

        @Deprecated
        public static ExcelWriter getWriter(OutputStream outputStream)
        已过时。  please use write()
        Get ExcelWriter
        参数:
        outputStream - the java OutputStream you wish to write the value to.
        返回:
        new ExcelWriter.
      • getWriter

        @Deprecated
        public static ExcelWriter getWriter(OutputStream outputStream,
                                                         ExcelTypeEnum typeEnum,
                                                         boolean needHead)
        已过时。  please use write()
        Get ExcelWriter
        参数:
        outputStream - the java OutputStream you wish to write the value to.
        typeEnum - 03 or 07
        needHead - Do you need to write the header to the file?
        返回:
        new ExcelWriter
      • getWriterWithTemp

        @Deprecated
        public static ExcelWriter getWriterWithTemp(InputStream temp,
                                                                 OutputStream outputStream,
                                                                 ExcelTypeEnum typeEnum,
                                                                 boolean needHead)
        已过时。  please use write()
        Get ExcelWriter with a template file
        参数:
        temp - Append value after a POI file , Can be null(the template POI filesystem that contains the Workbook stream)
        outputStream - the java OutputStream you wish to write the value to
        typeEnum - 03 or 07
        needHead - Whether a write header is required
        返回:
        new ExcelWriter
      • getWriterWithTempAndHandler

        @Deprecated
        public static ExcelWriter getWriterWithTempAndHandler(InputStream temp,
                                                                           OutputStream outputStream,
                                                                           ExcelTypeEnum typeEnum,
                                                                           boolean needHead,
                                                                           WriteHandler handler)
        已过时。  please use write()
        Get ExcelWriter with a template file
        参数:
        temp - Append value after a POI file , Can be null(the template POI filesystem that contains the Workbook stream)
        outputStream - the java OutputStream you wish to write the value to
        typeEnum - 03 or 07
        needHead - Whether a write header is required
        handler - User-defined callback
        返回:
        new ExcelWriter
      • write

        public static ExcelWriterBuilder write(File file)
        Build excel the write
        参数:
        file - File to write
        返回:
        Excel writer builder
      • write

        public static ExcelWriterBuilder write(File file,
                                               Class head)
        Build excel the write
        参数:
        file - File to write
        head - Annotate the class for configuration information
        返回:
        Excel writer builder
      • write

        public static ExcelWriterBuilder write(String pathName)
        Build excel the write
        参数:
        pathName - File path to write
        返回:
        Excel writer builder
      • write

        public static ExcelWriterBuilder write(String pathName,
                                               Class head)
        Build excel the write
        参数:
        pathName - File path to write
        head - Annotate the class for configuration information
        返回:
        Excel writer builder
      • write

        public static ExcelWriterBuilder write(OutputStream outputStream)
        Build excel the write
        参数:
        outputStream - Output stream to write
        返回:
        Excel writer builder
      • write

        public static ExcelWriterBuilder write(OutputStream outputStream,
                                               Class head)
        Build excel the write
        参数:
        outputStream - Output stream to write
        head - Annotate the class for configuration information.
        返回:
        Excel writer builder
      • writerSheet

        public static ExcelWriterSheetBuilder writerSheet()
        Build excel the writerSheet
        返回:
        Excel sheet writer builder
      • writerSheet

        public static ExcelWriterSheetBuilder writerSheet(Integer sheetNo)
        Build excel the writerSheet
        参数:
        sheetNo - Index of sheet,0 base.
        返回:
        Excel sheet writer builder.
      • writerSheet

        public static ExcelWriterSheetBuilder writerSheet(String sheetName)
        Build excel the 'writerSheet'
        参数:
        sheetName - The name of sheet.
        返回:
        Excel sheet writer builder.
      • writerSheet

        public static ExcelWriterSheetBuilder writerSheet(Integer sheetNo,
                                                          String sheetName)
        Build excel the 'writerSheet'
        参数:
        sheetNo - Index of sheet,0 base.
        sheetName - The name of sheet.
        返回:
        Excel sheet writer builder.
      • writerTable

        public static ExcelWriterTableBuilder writerTable()
        Build excel the writerTable
        返回:
        Excel table writer builder.
      • writerTable

        public static ExcelWriterTableBuilder writerTable(Integer tableNo)
        Build excel the 'writerTable'
        参数:
        tableNo - Index of table,0 base.
        返回:
        Excel table writer builder.
      • read

        public static ExcelReaderBuilder read()
        Build excel the read
        返回:
        Excel reader builder.
      • read

        public static ExcelReaderBuilder read(File file)
        Build excel the read
        参数:
        file - File to read.
        返回:
        Excel reader builder.
      • read

        public static ExcelReaderBuilder read(File file,
                                              ReadListener readListener)
        Build excel the read
        参数:
        file - File to read.
        readListener - Read listener.
        返回:
        Excel reader builder.
      • read

        public static ExcelReaderBuilder read(File file,
                                              Class head,
                                              ReadListener readListener)
        Build excel the read
        参数:
        file - File to read.
        head - Annotate the class for configuration information.
        readListener - Read listener.
        返回:
        Excel reader builder.
      • read

        public static ExcelReaderBuilder read(String pathName)
        Build excel the read
        参数:
        pathName - File path to read.
        返回:
        Excel reader builder.
      • read

        public static ExcelReaderBuilder read(String pathName,
                                              ReadListener readListener)
        Build excel the read
        参数:
        pathName - File path to read.
        readListener - Read listener.
        返回:
        Excel reader builder.
      • read

        public static ExcelReaderBuilder read(String pathName,
                                              Class head,
                                              ReadListener readListener)
        Build excel the read
        参数:
        pathName - File path to read.
        head - Annotate the class for configuration information.
        readListener - Read listener.
        返回:
        Excel reader builder.
      • read

        public static ExcelReaderBuilder read(InputStream inputStream)
        Build excel the read
        参数:
        inputStream - Input stream to read.
        返回:
        Excel reader builder.
      • read

        public static ExcelReaderBuilder read(InputStream inputStream,
                                              ReadListener readListener)
        Build excel the read
        参数:
        inputStream - Input stream to read.
        readListener - Read listener.
        返回:
        Excel reader builder.
      • read

        public static ExcelReaderBuilder read(InputStream inputStream,
                                              Class head,
                                              ReadListener readListener)
        Build excel the read
        参数:
        inputStream - Input stream to read.
        head - Annotate the class for configuration information.
        readListener - Read listener.
        返回:
        Excel reader builder.
      • readSheet

        public static ExcelReaderSheetBuilder readSheet()
        Build excel the 'readSheet'
        返回:
        Excel sheet reader builder.
      • readSheet

        public static ExcelReaderSheetBuilder readSheet(Integer sheetNo)
        Build excel the 'readSheet'
        参数:
        sheetNo - Index of sheet,0 base.
        返回:
        Excel sheet reader builder.
      • readSheet

        public static ExcelReaderSheetBuilder readSheet(String sheetName)
        Build excel the 'readSheet'
        参数:
        sheetName - The name of sheet.
        返回:
        Excel sheet reader builder.
      • readSheet

        public static ExcelReaderSheetBuilder readSheet(Integer sheetNo,
                                                        String sheetName)
        Build excel the 'readSheet'
        参数:
        sheetNo - Index of sheet,0 base.
        sheetName - The name of sheet.
        返回:
        Excel sheet reader builder.

Copyright © 2018–2019 Alibaba Group. All rights reserved.