public class CSVWorksheetWriter extends Object implements IWorksheetWriter
| 限定符和类型 | 字段和说明 |
|---|---|
protected BiConsumer<Sheet,Integer> |
progressConsumer
A progress window
|
protected Sheet |
sheet |
protected CSVUtil.Writer |
writer |
| 构造器和说明 |
|---|
CSVWorksheetWriter(Sheet sheet) |
| 限定符和类型 | 方法和说明 |
|---|---|
IWorksheetWriter |
clone()
Clone
|
void |
close() |
int |
getColumnLimit()
The column limit
|
String |
getFileSuffix()
Returns the worksheet name
|
int |
getRowLimit()
The row limit
|
protected Path |
initWriter(Path root) |
IWorksheetWriter |
setWorksheet(Sheet sheet)
Return a copy worksheet writer
|
protected void |
writeBefore()
Write worksheet header data
|
protected void |
writeRow(Row row)
Write a row data
|
void |
writeTo(Path root)
写入指定路径,传入的参数可以是一个文件也可以是文件夹,需要在实现类具体处理
|
void |
writeTo(Path path,
Supplier<RowBlock> supplier)
Write a row block
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisBigDecimal, isBool, isChar, isDate, isDateTime, isDouble, isFloat, isInt, isLocalDate, isLocalDateTime, isLocalTime, isLong, isOutOfSheet, isShort, isString, isTime, writeEmptySheetprotected Sheet sheet
protected CSVUtil.Writer writer
protected BiConsumer<Sheet,Integer> progressConsumer
public CSVWorksheetWriter(Sheet sheet)
public int getRowLimit()
getRowLimit 在接口中 IWorksheetWriter(1 << 31) - 1public int getColumnLimit()
getColumnLimit 在接口中 IWorksheetWriterpublic void writeTo(Path path, Supplier<RowBlock> supplier) throws IOException
IWorksheetWriterwriteTo 在接口中 IWorksheetWriterpath - the storage pathsupplier - a row-block supplierIOException - if io error occurpublic IWorksheetWriter setWorksheet(Sheet sheet)
IWorksheetWritersetWorksheet 在接口中 IWorksheetWritersheet - the Sheetpublic IWorksheetWriter clone()
IWorksheetWriterclone 在接口中 IWorksheetWriterclone 在类中 Objectpublic String getFileSuffix()
getFileSuffix 在接口中 IWorksheetWriterpublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableIOExceptionpublic void writeTo(Path root) throws IOException
StorablewriteTo 在接口中 Storableroot - 父级文件夹或文件绝对路径IOException - 写失败异常protected Path initWriter(Path root) throws IOException
IOExceptionprotected void writeBefore()
throws IOException
IOException - if I/O error occurprotected void writeRow(Row row) throws IOException
row - a row dataIOException - if I/O error occurCopyright © 2023. All rights reserved.