public interface ICellValueAndStyle
| 限定符和类型 | 方法和说明 |
|---|---|
default void |
conversion(Row row,
Cell cell,
Object o,
Column hc)
Int value conversion to others
|
default void |
downloadRemoteResource(Row row,
Cell cell,
String e,
Column hc,
Class<?> clazz)
Download resource from remote server
NOTE:By default, only marking the cell type as
REMOTE_URL does not actually download resources. |
default int |
getStyleIndex(Row row,
Column hc,
Object o)
Returns the cell style index
|
default boolean |
isAllowDirectOutput(Class<?> clazz)
Mark whitelist types that can be easily exported
|
default void |
reset(Row row,
Cell cell,
Object e,
Column hc)
Setting cell value and cell styles
|
default void |
setCellValue(Row row,
Cell cell,
Object e,
Column hc,
Class<?> clazz,
boolean hasConversion)
Setting cell value
|
default void |
setNullValue(Row row,
Cell cell,
Column hc)
Setting cell value as null
|
default <T> void |
setStyleDesign(T o,
Cell cell,
Column hc,
StyleProcessor<T> styleProcessor)
Setting all cell style of the specified row
|
default void |
unknownType(Row row,
Cell cell,
Object e,
Column hc,
Class<?> clazz)
unknown cell type converter
|
default void |
writeAsMedia(Row row,
Cell cell,
String e,
Column hc,
Class<?> clazz)
Convert string to binary
|
default void reset(Row row, Cell cell, Object e, Column hc)
row - the row numbercell - the celle - the cell valuehc - the header columndefault int getStyleIndex(Row row, Column hc, Object o)
row - the row datahc - the header columno - the cell valuedefault <T> void setStyleDesign(T o,
Cell cell,
Column hc,
StyleProcessor<T> styleProcessor)
T - the row's classo - the row datacell - the cell of rowhc - the header columnstyleProcessor - a customize StyleProcessordefault void setCellValue(Row row, Cell cell, Object e, Column hc, Class<?> clazz, boolean hasConversion)
row - the row numbercell - the celle - the cell valuehc - the header columnclazz - the cell value typehasConversion - 是否有输出转换器default void setNullValue(Row row, Cell cell, Column hc)
row - the row numbercell - the cellhc - the header columndefault void conversion(Row row, Cell cell, Object o, Column hc)
row - the row numbercell - the cello - the cell valuehc - the header columndefault void unknownType(Row row, Cell cell, Object e, Column hc, Class<?> clazz)
row - the row numbercell - the celle - the cell valuehc - the header columnclazz - the cell value typedefault void writeAsMedia(Row row, Cell cell, String e, Column hc, Class<?> clazz)
row - the row numbercell - the celle - the cell valuehc - the header columnclazz - the cell value typedefault void downloadRemoteResource(Row row, Cell cell, String e, Column hc, Class<?> clazz)
REMOTE_URL does not actually download resources.
Asynchronous download in IWorksheetWriter#writeRemoteMedia in the future.
Of course, you can also download and then call Cell.setInputStream(InputStream)
or Cell.setBinary(byte[]) to save the stream or binary results to the cell.row - the row numbercell - the celle - the cell valuehc - the header columnclazz - the cell value typedefault boolean isAllowDirectOutput(Class<?> clazz)
clazz - cell value classCopyright © 2023. All rights reserved.