程序包 com.sh.wf.excel
类 EasyExcelFactory
java.lang.Object
com.sh.wf.excel.EasyExcelFactory
- 直接已知子类:
EasyExcel
Reader and writer factory class
Quick start
Read
Sample1
Sample2
Write
Sample1
Sample2
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static ExcelReadergetReader(InputStream in, AnalysisEventListener listener) 已过时。static ExcelWritergetWriter(OutputStream outputStream) 已过时。please usewrite()static ExcelWritergetWriter(OutputStream outputStream, ExcelTypeEnum typeEnum, boolean needHead) 已过时。please usewrite()static ExcelWritergetWriterWithTemp(InputStream temp, OutputStream outputStream, ExcelTypeEnum typeEnum, boolean needHead) 已过时。please usewrite()static ExcelWritergetWriterWithTempAndHandler(InputStream temp, OutputStream outputStream, ExcelTypeEnum typeEnum, boolean needHead, WriteHandler handler) 已过时。please usewrite()static ExcelReaderBuilderread()Build excel the readstatic ExcelReaderBuilderBuild excel the readstatic ExcelReaderBuilderread(File file, ReadListener readListener) Build excel the readstatic ExcelReaderBuilderread(File file, Class head, ReadListener readListener) Build excel the readstatic ExcelReaderBuilderread(InputStream inputStream) Build excel the readread(InputStream in, Sheet sheet) 已过时。please use 'EasyExcel.read(in).sheet(sheetNo).doReadSync();'static ExcelReaderBuilderread(InputStream inputStream, ReadListener readListener) Build excel the readstatic ExcelReaderBuilderread(InputStream inputStream, Class head, ReadListener readListener) Build excel the readstatic ExcelReaderBuilderBuild excel the readstatic ExcelReaderBuilderread(String pathName, ReadListener readListener) Build excel the readstatic ExcelReaderBuilderread(String pathName, Class head, ReadListener readListener) Build excel the readstatic voidreadBySax(InputStream in, Sheet sheet, AnalysisEventListener listener) 已过时。please use 'EasyExcel.read(in,head,listener).sheet(sheetNo).doRead();'static ExcelReaderSheetBuilderBuild excel the 'readSheet'static ExcelReaderSheetBuilderBuild excel the 'readSheet'static ExcelReaderSheetBuilderBuild excel the 'readSheet'static ExcelReaderSheetBuilderBuild excel the 'readSheet'static ExcelWriterBuilderwrite()Build excel the writestatic ExcelWriterBuilderBuild excel the writestatic ExcelWriterBuilderBuild excel the writestatic ExcelWriterBuilderwrite(OutputStream outputStream) Build excel the writestatic ExcelWriterBuilderwrite(OutputStream outputStream, Class head) Build excel the writestatic ExcelWriterBuilderBuild excel the writestatic ExcelWriterBuilderBuild excel the writestatic ExcelWriterSheetBuilderBuild excel thewriterSheetstatic ExcelWriterSheetBuilderwriterSheet(Integer sheetNo) Build excel thewriterSheetstatic ExcelWriterSheetBuilderwriterSheet(Integer sheetNo, String sheetName) Build excel the 'writerSheet'static ExcelWriterSheetBuilderwriterSheet(String sheetName) Build excel the 'writerSheet'static ExcelWriterTableBuilderBuild excel thewriterTablestatic ExcelWriterTableBuilderwriterTable(Integer tableNo) Build excel the 'writerTable'
-
构造器详细资料
-
EasyExcelFactory
public EasyExcelFactory()
-
-
方法详细资料
-
read
已过时。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
已过时。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
已过时。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 07needHead- 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 totypeEnum- 03 or 07needHead- 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 totypeEnum- 03 or 07needHead- Whether a write header is requiredhandler- User-defined callback- 返回:
- new ExcelWriter
-
write
Build excel the write- 返回:
- ExcelWriterBuilder
-
write
Build excel the write- 参数:
file- File to write- 返回:
- Excel writer builder
-
write
Build excel the write- 参数:
file- File to writehead- Annotate the class for configuration information- 返回:
- Excel writer builder
-
write
Build excel the write- 参数:
pathName- File path to write- 返回:
- Excel writer builder
-
write
Build excel the write- 参数:
pathName- File path to writehead- Annotate the class for configuration information- 返回:
- Excel writer builder
-
write
Build excel the write- 参数:
outputStream- Output stream to write- 返回:
- Excel writer builder
-
write
Build excel the write- 参数:
outputStream- Output stream to writehead- Annotate the class for configuration information.- 返回:
- Excel writer builder
-
writerSheet
Build excel thewriterSheet- 返回:
- Excel sheet writer builder
-
writerSheet
Build excel thewriterSheet- 参数:
sheetNo- Index of sheet,0 base.- 返回:
- Excel sheet writer builder.
-
writerSheet
Build excel the 'writerSheet'- 参数:
sheetName- The name of sheet.- 返回:
- Excel sheet writer builder.
-
writerSheet
Build excel the 'writerSheet'- 参数:
sheetNo- Index of sheet,0 base.sheetName- The name of sheet.- 返回:
- Excel sheet writer builder.
-
writerTable
Build excel thewriterTable- 返回:
- Excel table writer builder.
-
writerTable
Build excel the 'writerTable'- 参数:
tableNo- Index of table,0 base.- 返回:
- Excel table writer builder.
-
read
Build excel the read- 返回:
- Excel reader builder.
-
read
Build excel the read- 参数:
file- File to read.- 返回:
- Excel reader builder.
-
read
Build excel the read- 参数:
file- File to read.readListener- Read listener.- 返回:
- Excel reader builder.
-
read
Build excel the read- 参数:
file- File to read.head- Annotate the class for configuration information.readListener- Read listener.- 返回:
- Excel reader builder.
-
read
Build excel the read- 参数:
pathName- File path to read.- 返回:
- Excel reader builder.
-
read
Build excel the read- 参数:
pathName- File path to read.readListener- Read listener.- 返回:
- Excel reader builder.
-
read
Build excel the read- 参数:
pathName- File path to read.head- Annotate the class for configuration information.readListener- Read listener.- 返回:
- Excel reader builder.
-
read
Build excel the read- 参数:
inputStream- Input stream to read.- 返回:
- Excel reader builder.
-
read
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
Build excel the 'readSheet'- 返回:
- Excel sheet reader builder.
-
readSheet
Build excel the 'readSheet'- 参数:
sheetNo- Index of sheet,0 base.- 返回:
- Excel sheet reader builder.
-
readSheet
Build excel the 'readSheet'- 参数:
sheetName- The name of sheet.- 返回:
- Excel sheet reader builder.
-
readSheet
Build excel the 'readSheet'- 参数:
sheetNo- Index of sheet,0 base.sheetName- The name of sheet.- 返回:
- Excel sheet reader builder.
-
read()build 'ExcelReader'