See BuiltinFormats for a list of supported built-in formats.
International Formats
Since version 2003 Excel has supported international formats. These are denoted
with a prefix "[$-xxx]" (where xxx is a 1-7 digit hexadecimal number).
| Modifier and Type | Field and Description |
|---|---|
| private static final String[] | |
| private final Vector | |
| private boolean | |
| private final InternalWorkbook |
| Access | Constructor and Description |
|---|---|
| pack-priv | HSSFDataFormat(InternalWorkbook
the workbook the formats are tied to. workbook)Constructs a new data formatter. |
| Modifier and Type | Method and Description |
|---|---|
| private void | ensureFormatsSize(int index)
Ensures that the formats list can hold entries up to and including the entry with this index |
| public static short | Returns: index of format or -1 if undefined.string matching a built in format format)get the format index that matches the given format string Automatically converts "text" to excel's format string to represent text. |
| public static String | Returns: string represented at index of format or null if there is not a builtin format at that indexof a built in format index)get the format string that matches the given format index |
| public static List | |
| public short | Returns: index of format.string matching a built in format pFormat)Implements org. Get the format index that matches the given format string, creating a new format entry if required. |
| public String | Returns: string represented at index of format or null if there is not a format at that indexof a format index)Implements org. get the format string that matches the given format index |
| public static int | Returns: number of built-in and reserved builtinFormatsget the number of built-in and reserved builtinFormats |
| _builtinFormats | back to summary |
|---|---|
| private static final String[] _builtinFormats | |
| _formats | back to summary |
|---|---|
| private final Vector<String> _formats | |
| _movedBuiltins | back to summary |
|---|---|
| private boolean _movedBuiltins | |
| _workbook | back to summary |
|---|---|
| private final InternalWorkbook _workbook | |
| HSSFDataFormat | back to summary |
|---|---|
| pack-priv HSSFDataFormat(InternalWorkbook workbook) Constructs a new data formatter. It takes a workbook to have access to the workbooks format records.
| |
| ensureFormatsSize | back to summary |
|---|---|
| private void ensureFormatsSize(int index) Ensures that the formats list can hold entries up to and including the entry with this index | |
| getBuiltinFormat | back to summary |
|---|---|
| public static short getBuiltinFormat(String format) get the format index that matches the given format string Automatically converts "text" to excel's format string to represent text.
| |
| getBuiltinFormat | back to summary |
|---|---|
| public static String getBuiltinFormat(short index) get the format string that matches the given format index
| |
| getBuiltinFormats | back to summary |
|---|---|
| public static List | |
| getFormat | back to summary |
|---|---|
| public short getFormat(String pFormat) Implements org. Get the format index that matches the given format string, creating a new format entry if required. Aliases text to the proper format as required.
| |
| getFormat | back to summary |
|---|---|
| public String getFormat(short index) Implements org. get the format string that matches the given format index
| |
| getNumberOfBuiltinBuiltinFormats | back to summary |
|---|---|
| public static int getNumberOfBuiltinBuiltinFormats() get the number of built-in and reserved builtinFormats
| |