public final class HSSFDataFormat extends java.lang.Object implements DataFormat
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).
See the Microsoft article
Creating international number formats
for more details on these codes.
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getBuiltinFormat(short index)
get the format string that matches the given format index
|
static short |
getBuiltinFormat(java.lang.String format)
get the format index that matches the given format string
|
static java.util.List<java.lang.String> |
getBuiltinFormats() |
java.lang.String |
getFormat(short index)
get the format string that matches the given format index
|
short |
getFormat(java.lang.String pFormat)
Get the format index that matches the given format
string, creating a new format entry if required.
|
static int |
getNumberOfBuiltinBuiltinFormats()
get the number of built-in and reserved builtinFormats
|
public static java.util.List<java.lang.String> getBuiltinFormats()
public static short getBuiltinFormat(java.lang.String format)
Automatically converts "text" to excel's format string to represent text.
format
- string matching a built in formatpublic short getFormat(java.lang.String pFormat)
getFormat
in interface DataFormat
pFormat
- string matching a built in formatpublic java.lang.String getFormat(short index)
getFormat
in interface DataFormat
index
- of a formatpublic static java.lang.String getBuiltinFormat(short index)
index
- of a built in formatpublic static int getNumberOfBuiltinBuiltinFormats()
Copyright 2020 The Apache Software Foundation or its licensors, as applicable.