com.alibaba.excel

类 ExcelWriter


  • public class ExcelWriter
    extends Object
    Excel Writer This tool is used to write value out to Excel via POI. This object can perform the following two functions.
        1. Create a new empty Excel workbook, write the value to the stream after the value is filled.
        2. Edit existing Excel, write the original Excel file, or write it to other places.}
     
    作者:
    jipengfei
    • 构造器详细资料

      • ExcelWriter

        public ExcelWriter(WriteWorkbook writeWorkbook)
        Create new writer
        参数:
        writeWorkbook -
      • ExcelWriter

        @Deprecated
        public ExcelWriter(OutputStream outputStream,
                                        ExcelTypeEnum typeEnum)
        已过时。  please use ExcelWriterBuilder build ExcelWriter
        Create new writer
        参数:
        outputStream - the java OutputStream you wish to write the value to
        typeEnum - 03 or 07
      • ExcelWriter

        @Deprecated
        public ExcelWriter(OutputStream outputStream,
                                        ExcelTypeEnum typeEnum,
                                        boolean needHead)
        已过时。  please use ExcelWriterBuilder build ExcelWriter
        Create new writer
        参数:
        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?
      • ExcelWriter

        @Deprecated
        public ExcelWriter(InputStream templateInputStream,
                                        OutputStream outputStream,
                                        ExcelTypeEnum typeEnum,
                                        Boolean needHead)
        已过时。  please use ExcelWriterBuilder build ExcelWriter
        Create new writer
        参数:
        templateInputStream - 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
      • ExcelWriter

        @Deprecated
        public ExcelWriter(InputStream templateInputStream,
                                        OutputStream outputStream,
                                        ExcelTypeEnum typeEnum,
                                        Boolean needHead,
                                        WriteHandler writeHandler)
        已过时。  please use ExcelWriterBuilder build ExcelWriter
        Create new writer
        参数:
        templateInputStream - 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
        writeHandler - User-defined callback
    • 方法详细资料

      • write

        public ExcelWriter write(List data,
                                 WriteSheet writeSheet)
        Write data to a sheet
        参数:
        data - Data to be written
        writeSheet - Write to this sheet
        返回:
        this current writer
      • write

        public ExcelWriter write(List data,
                                 WriteSheet writeSheet,
                                 WriteTable writeTable)
        Write value to a sheet
        参数:
        data - Data to be written
        writeSheet - Write to this sheet
        writeTable - Write to this table
        返回:
        this
      • merge

        @Deprecated
        public ExcelWriter merge(int firstRow,
                                              int lastRow,
                                              int firstCol,
                                              int lastCol)
        已过时。  please useOnceAbsoluteMergeStrategy
        Merge Cells,Indexes are zero-based.
        参数:
        firstRow - Index of first row
        lastRow - Index of last row (inclusive), must be equal to or larger than firstRow
        firstCol - Index of first column
        lastCol - Index of last column (inclusive), must be equal to or larger than firstCol
      • finish

        public void finish()
        Close IO
      • finalize

        protected void finalize()
        Prevents calls to finish() from freeing the cache
        覆盖:
        finalize 在类中  Object
      • writeContext

        public WriteContext writeContext()
        The context of the entire writing process
        返回:

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