public class POIExcelWriterProcessor extends Object implements ExcelWriterProcessor
| 构造器和说明 |
|---|
POIExcelWriterProcessor(OutputStream outputStream,
org.apache.poi.ss.usermodel.Workbook workbook,
boolean autoWrite)
带参数的构造方法,参数不能为空
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
done()
完成写出,对excel操作完毕之后,调用此方法写出
|
int |
getSheetIndex() |
<C> C |
nextCell()
创建当前行的列,将在当前行创建一个单元格对象,并返回实例,如POI的Cell
|
<R> R |
nextRow()
下一行操作,将创建一行并返回这一行的对象引用,如POI中的Row
|
void |
setSheetIndex(int sheetIndex) |
<S> S |
start()
开始写出,只能调用一次,成功后,将返回表格对象,如POI中的Sheet
|
<S> S |
start(String sheetName)
开始写出,并指定表格名字,只能调用一次,成功后,将返回表格对象,如POI中的Sheet
|
public POIExcelWriterProcessor(OutputStream outputStream, org.apache.poi.ss.usermodel.Workbook workbook, boolean autoWrite)
outputStream - 文档输出流workbook - 工作簿实例public <S> S start()
throws Exception
ExcelWriterProcessorstart 在接口中 ExcelWriterProcessorS - 表格对象泛型Exception - 启动异常,如果已经启动,将抛出异常public <S> S start(String sheetName) throws Exception
ExcelWriterProcessorstart 在接口中 ExcelWriterProcessorS - 表格对象泛型sheetName - 表格名字Exception - 启动异常,如果已经启动,将抛出异常public <R> R nextRow()
ExcelWriterProcessornextRow 在接口中 ExcelWriterProcessorR - 行对象泛型public <C> C nextCell()
ExcelWriterProcessornextCell 在接口中 ExcelWriterProcessorC - 单元格对象泛型public void done()
throws Exception
ExcelWriterProcessordone 在接口中 ExcelWriterProcessorException - 写出异常public int getSheetIndex()
public void setSheetIndex(int sheetIndex)
Copyright © 2018. All rights reserved.