public class XMLWorksheetWriter extends Object implements IWorksheetWriter
| 构造器和说明 |
|---|
XMLWorksheetWriter(Sheet sheet) |
| 限定符和类型 | 方法和说明 |
|---|---|
IWorksheetWriter |
clone()
Clone
|
void |
close()
Release resources
|
int |
getColumnLimit()
The Worksheet column limit
|
int |
getRowLimit()
Override this method to modify the maximum number
of rows per page, this value contains the header
row and data rows
eq: limit is 100 means data has 99 rows
|
protected Path |
initWriter(Path root) |
protected void |
resizeColumnWidth(File path,
int rows)
Resize column width
|
IWorksheetWriter |
setWorksheet(Sheet sheet)
Rest worksheet
|
protected int |
startRow(int rows,
int columns)
Write begin of row
|
protected void |
writeAfter(int total)
Write at after worksheet body
|
protected void |
writeBefore()
Write worksheet header data
|
protected void |
writeBool(boolean bool,
int row,
int column,
int xf)
Write boolean value
|
protected void |
writeChar(char c,
int row,
int column,
int xf)
Write char value
|
protected void |
writeDecimal(BigDecimal bd,
int row,
int column,
int xf)
Write decimal value
|
protected void |
writeDecimalAutoSize(BigDecimal bd,
int row,
int column,
int xf)
Write decimal value and cache the max value
|
protected void |
writeDouble(double d,
int row,
int column,
int xf)
Write double value
|
protected void |
writeDoubleAutoSize(double d,
int row,
int column,
int xf)
Write double value and cache the max value
|
protected void |
writeHeaderRow()
Write the header row
|
protected void |
writeNull(int row,
int column,
int xf)
Write blank value
|
protected void |
writeNumeric(long l,
int row,
int column,
int xf)
Write numeric value
|
protected void |
writeNumericAutoSize(long l,
int row,
int column,
int xf)
Write numeric value and cache the max value
|
protected void |
writeRow(Row row)
Write a row data
|
protected void |
writeRowAutoSize(Row row)
Write a row data
|
protected void |
writeString(String s,
int row,
int column,
int xf)
Write string value
|
protected void |
writeStringAutoSize(String s,
int row,
int column,
int xf)
Write string value and cache the max string length
|
void |
writeTo(Path path)
Write a row block
|
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, isShort, isString, isTime, outOfSheet, writeEmptySheetpublic XMLWorksheetWriter(Sheet sheet)
public void writeTo(Path path, Supplier<RowBlock> supplier) throws IOException
writeTo 在接口中 IWorksheetWritersupplier - a row-block supplierpath - the storage pathIOException - if I/O error occurpublic void writeTo(Path path) throws IOException
writeTo 在接口中 Storablepath - the storage pathIOException - if I/O error occurprotected Path initWriter(Path root) throws IOException
IOExceptionpublic IWorksheetWriter setWorksheet(Sheet sheet)
setWorksheet 在接口中 IWorksheetWritersheet - the worksheetpublic IWorksheetWriter clone()
IWorksheetWriterclone 在接口中 IWorksheetWriterclone 在类中 Objectpublic int getRowLimit()
eq: limit is 100 means data has 99 rows
getRowLimit 在接口中 IWorksheetWriterpublic int getColumnLimit()
getColumnLimit 在接口中 IWorksheetWriterprotected void writeBefore()
throws IOException
IOException - if I/O error occurprotected void writeHeaderRow()
throws IOException
IOException - if I/O error occurprotected void writeAfter(int total)
throws IOException
total - the total of rowsIOException - if I/O error occurprotected int startRow(int rows,
int columns)
throws IOException
rows - the row index (zero base)columns - the column lengthIOException - if I/O error occurprotected void writeRow(Row row) throws IOException
row - a row dataIOException - if I/O error occurprotected void writeRowAutoSize(Row row) throws IOException
row - a row dataIOException - if I/O error occurprotected void writeString(String s, int row, int column, int xf) throws IOException
s - the string valuerow - the row indexcolumn - the column indexxf - the style indexIOException - if I/O error occurprotected void writeStringAutoSize(String s, int row, int column, int xf) throws IOException
s - the string valuerow - the row indexcolumn - the column indexxf - the style indexIOException - if I/O error occurprotected void writeDouble(double d,
int row,
int column,
int xf)
throws IOException
d - the double valuerow - the row indexcolumn - the column indexxf - the style indexIOException - if I/O error occurprotected void writeDoubleAutoSize(double d,
int row,
int column,
int xf)
throws IOException
d - the double valuerow - the row indexcolumn - the column indexxf - the style indexIOException - if I/O error occurprotected void writeDecimal(BigDecimal bd, int row, int column, int xf) throws IOException
bd - the decimal valuerow - the row indexcolumn - the column indexxf - the style indexIOException - if I/O error occurprotected void writeDecimalAutoSize(BigDecimal bd, int row, int column, int xf) throws IOException
bd - the decimal valuerow - the row indexcolumn - the column indexxf - the style indexIOException - if I/O error occurprotected void writeChar(char c,
int row,
int column,
int xf)
throws IOException
c - the character valuerow - the row indexcolumn - the column indexxf - the style indexIOException - if I/O error occurprotected void writeNumeric(long l,
int row,
int column,
int xf)
throws IOException
l - the numeric valuerow - the row indexcolumn - the column indexxf - the style indexIOException - if I/O error occurprotected void writeNumericAutoSize(long l,
int row,
int column,
int xf)
throws IOException
l - the numeric valuerow - the row indexcolumn - the column indexxf - the style indexIOException - if I/O error occurprotected void writeBool(boolean bool,
int row,
int column,
int xf)
throws IOException
bool - the boolean valuerow - the row indexcolumn - the column indexxf - the style indexIOException - if I/O error occurprotected void writeNull(int row,
int column,
int xf)
throws IOException
row - the row indexcolumn - the column indexxf - the style indexIOException - if I/O error occurprotected void resizeColumnWidth(File path, int rows) throws IOException
path - the sheet temp pathrows - total of rowsIOException - if I/O error occurpublic void close()
close 在接口中 Closeableclose 在接口中 AutoCloseableCopyright © 2020. All rights reserved.