@Target(value={FIELD,METHOD}) @Retention(value=RUNTIME) @Inherited @Documented @Repeatable(value=ExcelColumns.class) public @interface ExcelColumn
| 限定符和类型 | 可选元素和说明 |
|---|---|
int |
colIndex
Specify the column index(zero base), Range from
0 to 16383 include 16383
The column set by colIndex is an absolute position. |
HeaderComment |
comment
Specify a comment in header column
If this annotation appears with
@HeaderComment at
the same time, the independent @HeaderComment annotation
takes precedence
NOTE: This attribute only affects the header line |
String |
format
Specify the cell format.
|
boolean |
hide
Hidden current column
Only set the column to hide, the data will still be written,
you can right-click to "un-hide" to display in file
|
double |
maxWidth
If
Sheet.autoSize() is true, The column width take the minimum of `width` and `maxWidth`,
if `autoWidth` is false, The column width use `maxWidth` directly as the column width |
boolean |
share
Share body string
|
String |
value
Title of column
|
boolean |
wrapText
Wrap text in a cell
Microsoft Excel can wrap text so it appears on multiple lines in a cell.
|
public abstract String value
public abstract HeaderComment comment
If this annotation appears with @HeaderComment at
the same time, the independent @HeaderComment annotation
takes precedence
NOTE: This attribute only affects the header line
HeaderCommentpublic abstract String format
It only supports the format specified by Office excel, please refer
to NumFmt.
If you are not sure whether the format is correct, please open
Office excel> Format cell> Custom to debug the
custom format here.
Note: It only used on Number or Date(include Timestamp, Time and java.time.*) field.
public abstract boolean wrapText
Microsoft Excel can wrap text so it appears on multiple lines in a cell. You can format the cell so the text wraps automatically, or enter a manual line break.
public abstract int colIndex
0 to 16383 include 16383
The column set by colIndex is an absolute position. For example,
if colIndex=100, this column must be placed at the "CV" position
public abstract double maxWidth
Sheet.autoSize() is true, The column width take the minimum of `width` and `maxWidth`,
if `autoWidth` is false, The column width use `maxWidth` directly as the column widthCopyright © 2022. All rights reserved.