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
(获取内置和保留的 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.
(获取与给定格式字符串匹配的格式索引自动将“文本”转换为excel的格式字符串来表示文本。)format
- string matching a built in format
(format - 匹配内置格式的字符串)
public short getFormat(java.lang.String pFormat)
getFormat
in interface
DataFormat
(接口 DataFormat 中的 getFormat)
pFormat
- string matching a built in format
(pFormat - 匹配内置格式的字符串)
public java.lang.String getFormat(short index)
getFormat
in interface
DataFormat
(接口 DataFormat 中的 getFormat)
index
- of a format
(索引 - 一种格式)
public static java.lang.String getBuiltinFormat(short index)
index
- of a built in format
(index - 内置格式)
public static int getNumberOfBuiltinBuiltinFormats()
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.