|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.hssf.HssfTableUtils.ContextSensitiveCellValueConverter
public static class HssfTableUtils.ContextSensitiveCellValueConverter
Converts the cell value in a table to the value that will be written to Excel cell. The benefit of this converter is that you would get almost the same visible contents in Excel as you run your application. However, the side effect is that everything in Excel at the start point would be String instead of its original type. In this case, the return value of getDataFormat does not take effect.
Constructor Summary | |
---|---|
HssfTableUtils.ContextSensitiveCellValueConverter()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HssfTableUtils.ContextSensitiveCellValueConverter()
Method Detail |
---|
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 value
public 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
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |