public static class HssfTableUtils.DefaultCellValueConverter extends Object implements HssfTableUtils.CellValueConverter
Constructor and Description |
---|
HssfTableUtils.DefaultCellValueConverter() |
Modifier and Type | Method and Description |
---|---|
Object |
convert(JTable table,
Object value,
int rowIndex,
int columnIndex)
Converts the value to the value you want to set in the csv file.
|
int |
getDataFormat(JTable table,
Object value,
int rowIndex,
int columnIndex)
Gets the data format for the value.
|
public HssfTableUtils.DefaultCellValueConverter()
public Object convert(JTable table, Object value, int rowIndex, int columnIndex)
ValueConverter
convert
in interface ValueConverter
table
- the tablevalue
- the value in the tablerowIndex
- the row index of the valuecolumnIndex
- the column index of the valuepublic int getDataFormat(JTable table, Object value, int rowIndex, int columnIndex)
HssfTableUtils.CellValueConverter
0x26, "(#,##0_);[Red](#,##0)"
0x27, "(#,##0.00_);(#,##0.00)"
0x28, "(#,##0.00_);[Red](#,##0.00)"
0x29, "_(*#,##0_);_(*(#,##0);_(* \"-\"_);_(@_)"
0x2a, "_($*#,##0_);_($*(#,##0);_($* \"-\"_);_(@_)"
0x2b, "_(*#,##0.00_);_(*(#,##0.00);_(*\"-\"??_);_(@_)"
0x2c, "_($*#,##0.00_);_($*(#,##0.00);_($*\"-\"??_);_(@_)"
0x2d, "mm:ss"
0x2e, "[h]:mm:ss"
0x2f, "mm:ss.0"
0x30, "##0.0E+0"
0x31, "@" - This is text format.
0x31 "text" - Alias for "@"
If you need to access the HSSFWorkbook instance used during this exporting process, you can get it using table.getClientProperty("HssfTableUtils.HSSFWorkbook").
getDataFormat
in interface HssfTableUtils.CellValueConverter
table
- the tablevalue
- the value in the tablerowIndex
- the row index of the valuecolumnIndex
- the column index of the value