com.alibaba.excel
类 EasyExcelFactory
- java.lang.Object
-
- com.alibaba.excel.EasyExcelFactory
-
构造器概要
构造器 构造器和说明 EasyExcelFactory()
方法概要
所有方法 静态方法 具体方法 已过时的方法 限定符和类型 方法和说明 static ExcelReader
getReader(InputStream in, AnalysisEventListener listener)
已过时。please useread()
build 'ExcelReader'static ExcelWriter
getWriter(OutputStream outputStream)
已过时。please usewrite()
static ExcelWriter
getWriter(OutputStream outputStream, ExcelTypeEnum typeEnum, boolean needHead)
已过时。please usewrite()
static ExcelWriter
getWriterWithTemp(InputStream temp, OutputStream outputStream, ExcelTypeEnum typeEnum, boolean needHead)
已过时。please usewrite()
static ExcelWriter
getWriterWithTempAndHandler(InputStream temp, OutputStream outputStream, ExcelTypeEnum typeEnum, boolean needHead, WriteHandler handler)
已过时。please usewrite()
static ExcelReaderBuilder
read()
Build excel the readstatic ExcelReaderBuilder
read(File file)
Build excel the readstatic ExcelReaderBuilder
read(File file, Class head, ReadListener readListener)
Build excel the readstatic ExcelReaderBuilder
read(File file, ReadListener readListener)
Build excel the readstatic ExcelReaderBuilder
read(InputStream inputStream)
Build excel the readstatic ExcelReaderBuilder
read(InputStream inputStream, Class head, ReadListener readListener)
Build excel the readstatic ExcelReaderBuilder
read(InputStream inputStream, ReadListener readListener)
Build excel the readstatic List<Object>
read(InputStream in, Sheet sheet)
已过时。please use 'EasyExcel.read(in).sheet(sheetNo).doReadSync();'static ExcelReaderBuilder
read(String pathName)
Build excel the readstatic ExcelReaderBuilder
read(String pathName, Class head, ReadListener readListener)
Build excel the readstatic ExcelReaderBuilder
read(String pathName, ReadListener readListener)
Build excel the readstatic void
readBySax(InputStream in, Sheet sheet, AnalysisEventListener listener)
已过时。please use 'EasyExcel.read(in,head,listener).sheet(sheetNo).doRead();'static ExcelReaderSheetBuilder
readSheet()
Build excel the 'readSheet'static ExcelReaderSheetBuilder
readSheet(Integer sheetNo)
Build excel the 'readSheet'static ExcelReaderSheetBuilder
readSheet(Integer sheetNo, String sheetName)
Build excel the 'readSheet'static ExcelReaderSheetBuilder
readSheet(String sheetName)
Build excel the 'readSheet'static ExcelWriterBuilder
write()
Build excel the writestatic ExcelWriterBuilder
write(File file)
Build excel the writestatic ExcelWriterBuilder
write(File file, Class head)
Build excel the writestatic ExcelWriterBuilder
write(OutputStream outputStream)
Build excel the writestatic ExcelWriterBuilder
write(OutputStream outputStream, Class head)
Build excel the writestatic ExcelWriterBuilder
write(String pathName)
Build excel the writestatic ExcelWriterBuilder
write(String pathName, Class head)
Build excel the writestatic ExcelWriterSheetBuilder
writerSheet()
Build excel thewriterSheet
static ExcelWriterSheetBuilder
writerSheet(Integer sheetNo)
Build excel thewriterSheet
static ExcelWriterSheetBuilder
writerSheet(Integer sheetNo, String sheetName)
Build excel the 'writerSheet'static ExcelWriterSheetBuilder
writerSheet(String sheetName)
Build excel the 'writerSheet'static ExcelWriterTableBuilder
writerTable()
Build excel thewriterTable
static ExcelWriterTableBuilder
writerTable(Integer tableNo)
Build excel the 'writerTable'
-
方法详细资料
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 useread()
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 usewrite()
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 usewrite()
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 usewrite()
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 usewrite()
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()
Build excel the write- 返回:
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 thewriterSheet
- 返回:
- Excel sheet writer builder
writerSheet
public static ExcelWriterSheetBuilder writerSheet(Integer sheetNo)
Build excel thewriterSheet
- 参数:
-
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 thewriterTable
- 返回:
- 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.