public class Column extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
Comment |
cellComment |
Integer |
cellStyle
The style of cell
|
Class<?> |
clazz
The cell type
|
int |
colIndex
Specify the column index
|
Comment |
headerComment |
Integer |
headerStyle
The style of header
|
boolean |
ignoreValue
Only export column name and ignore value
|
String |
key
The key of Map or field name of entry
|
String |
name
The header name
|
NumFmt |
numFmt
Specify the cell number format
|
int |
o |
ConversionProcessor |
processor
The int value conversion
|
boolean |
share
The string value is shared
|
StyleProcessor |
styleProcessor
The style conversion
|
Styles |
styles |
double |
width
The cell width
|
int |
wrapText
Wrap text in a cell
|
| 构造器和说明 |
|---|
Column()
Constructor Column
|
Column(String name,
Class<?> clazz)
Constructor Column
|
Column(String name,
Class<?> clazz,
boolean share)
Constructor Column
|
Column(String name,
Class<?> clazz,
ConversionProcessor processor)
Constructor Column
|
Column(String name,
Class<?> clazz,
ConversionProcessor processor,
boolean share)
Constructor Column
|
Column(String name,
Class<?> clazz,
int cellStyle)
Constructor Column
|
Column(String name,
Class<?> clazz,
int cellStyle,
boolean share)
Constructor Column
|
Column(String name,
String key)
Constructor Column
|
Column(String name,
String key,
boolean share)
Constructor Column
|
Column(String name,
String key,
Class<?> clazz)
Constructor Column
|
Column(String name,
String key,
Class<?> clazz,
ConversionProcessor processor)
Constructor Column
|
Column(String name,
String key,
ConversionProcessor processor)
Constructor Column
|
Column(String name,
String key,
ConversionProcessor processor,
boolean share)
Constructor Column
|
Column(String name,
String key,
int cellStyle)
Constructor Column
|
Column(String name,
String key,
int cellStyle,
boolean share)
Constructor Column
|
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getCellStyle()
Setting the cell styles
|
int |
getCellStyle(Class<?> clazz)
Returns default style based on cell type
|
int |
getCellStyleIndex()
Returns the style index of cell, -1 if not be setting
|
Class<?> |
getClazz()
Returns the cell type
|
int |
getHeaderStyleIndex()
Returns the header style index of cell, -1 if not be setting
|
String |
getName()
Returns the column name
|
NumFmt |
getNumFmt()
Returns the column
NumFmt |
double |
getWidth()
Returns the width of cell
|
Column |
ignoreValue()
Ignore value
|
boolean |
isIgnoreValue() |
boolean |
isShare()
Setting the cell is shared
|
Column |
setCellStyle(Font font)
Setting the cell styles
|
Column |
setCellStyle(Font font,
Border border)
Setting the cell styles
|
Column |
setCellStyle(Font font,
Border border,
int horizontal)
Setting the cell styles
|
Column |
setCellStyle(Font font,
Fill fill,
Border border)
Setting the cell styles
|
Column |
setCellStyle(Font font,
Fill fill,
Border border,
int horizontal)
Setting the cell styles
|
Column |
setCellStyle(Font font,
Fill fill,
Border border,
int vertical,
int horizontal)
Setting the cell styles
|
Column |
setCellStyle(Font font,
int horizontal)
Setting the cell styles
|
Column |
setCellStyle(int cellStyle)
Setting the cell's style
|
Column |
setCellStyle(NumFmt numFmt,
Font font,
Fill fill,
Border border,
int vertical,
int horizontal)
Setting the cell styles
|
Column |
setClazz(Class<?> clazz)
Setting the cell type
|
Column |
setColIndex(int colIndex)
Settings the x-axis of column in row
|
Column |
setHeaderComment(Comment headerComment)
Setting the header cell comment
|
Column |
setHeaderStyle(int headerStyle)
Setting the header's style
|
Column |
setName(String name)
Setting the column name
|
Column |
setNumFmt(String code)
Setting a cell format of number or date type
|
Column |
setProcessor(ConversionProcessor processor)
Setting the int value conversion
|
Column |
setShare(boolean share)
Setting cell string value is shared
Shared is only valid for strings, and the converted cell type
is also valid for strings.
|
Column |
setStyleProcessor(StyleProcessor styleProcessor)
Setting the style conversion
|
Column |
setWidth(double width)
Setting the cell's width
|
Column |
setWrapText(boolean wrapText)
Wrap text in a cell
Microsoft Excel can wrap text so it appears on multiple lines in a cell.
|
public String key
public String name
public Class<?> clazz
public boolean share
public ConversionProcessor processor
public StyleProcessor styleProcessor
public Integer cellStyle
public Integer headerStyle
public double width
public int o
public Styles styles
public Comment headerComment
public Comment cellComment
public NumFmt numFmt
public boolean ignoreValue
public int wrapText
public int colIndex
public Column()
public Column(String name, Class<?> clazz)
name - the column nameclazz - the cell typepublic Column(String name, String key)
name - the column namekey - fieldpublic Column(String name, String key, Class<?> clazz)
name - the column namekey - fieldclazz - the cell typepublic Column(String name, Class<?> clazz, ConversionProcessor processor)
name - the column nameclazz - the cell typeprocessor - The int value conversionpublic Column(String name, String key, ConversionProcessor processor)
name - the column namekey - fieldprocessor - The int value conversionpublic Column(String name, Class<?> clazz, boolean share)
name - the column nameclazz - the cell typeshare - true:shared false:inline stringpublic Column(String name, String key, boolean share)
name - the column namekey - filedshare - true:shared false:inline stringpublic Column(String name, Class<?> clazz, ConversionProcessor processor, boolean share)
name - the column nameclazz - the cell typeprocessor - The int value conversionshare - true:shared false:inline stringpublic Column(String name, String key, Class<?> clazz, ConversionProcessor processor)
name - the column namekey - fieldclazz - type of cellprocessor - The int value conversionpublic Column(String name, String key, ConversionProcessor processor, boolean share)
name - the column namekey - fieldprocessor - The int value conversionshare - true:shared false:inline stringpublic Column(String name, Class<?> clazz, int cellStyle)
name - the column nameclazz - the cell typecellStyle - the style of cellpublic Column(String name, String key, int cellStyle)
name - the column namekey - fieldcellStyle - the style of cellpublic Column(String name, Class<?> clazz, int cellStyle, boolean share)
name - the column nameclazz - the cell typecellStyle - the style of cellshare - true:shared false:inline stringpublic Column setWidth(double width)
width - the width valueColumnpublic boolean isShare()
public String getName()
public Column setName(String name)
name - the column nameColumnpublic Class<?> getClazz()
public Column setClazz(Class<?> clazz)
clazz - the cell typeColumnpublic Column setProcessor(ConversionProcessor processor)
processor - The int value conversionColumnpublic Column setStyleProcessor(StyleProcessor styleProcessor)
styleProcessor - The style conversionColumnpublic double getWidth()
public Column setCellStyle(int cellStyle)
cellStyle - the styles valueColumnpublic Column setHeaderStyle(int headerStyle)
headerStyle - the styles valueColumnpublic Column setColIndex(int colIndex)
colIndex - column index (zero base)Columnpublic int getCellStyleIndex()
public int getHeaderStyleIndex()
public Column setCellStyle(Font font)
font - the fontColumnpublic Column setCellStyle(Font font, int horizontal)
font - the fonthorizontal - the horizontal styleColumnpublic Column setCellStyle(Font font, Border border)
font - the fontborder - the border styleColumnpublic Column setCellStyle(Font font, Border border, int horizontal)
font - the fontborder - the border stylehorizontal - the horizontal styleColumnpublic Column setCellStyle(Font font, Fill fill, Border border)
font - the fontfill - the fill styleborder - the border styleColumnpublic Column setCellStyle(Font font, Fill fill, Border border, int horizontal)
font - the fontfill - the fill styleborder - the border stylehorizontal - the horizontal styleColumnpublic Column setCellStyle(Font font, Fill fill, Border border, int vertical, int horizontal)
font - the fontfill - the fill styleborder - the border stylevertical - the vertical stylehorizontal - the horizontal styleColumnpublic Column setCellStyle(NumFmt numFmt, Font font, Fill fill, Border border, int vertical, int horizontal)
numFmt - the number formatfont - the fontfill - the fill styleborder - the border stylevertical - the vertical stylehorizontal - the horizontal styleColumnpublic Column setShare(boolean share)
share - true:shared false:inline stringColumnpublic Column setNumFmt(String code)
code - the format stringColumnpublic int getCellStyle(Class<?> clazz)
clazz - the cell typepublic int getCellStyle()
public boolean isIgnoreValue()
public Column setWrapText(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.
wrapText - set wrapColumn selfCopyright © 2022. All rights reserved.