public interface Styles
Modifier and Type | Method and Description |
---|---|
XSSFCellBorder |
getBorderAt(int idx) |
XSSFCellFill |
getFillAt(int idx) |
XSSFFont |
getFontAt(int idx) |
java.lang.String |
getNumberFormatAt(short fmtId)
Get number format string given its id
(获取给定其 id 的数字格式字符串)
|
int |
getNumCellStyles() |
int |
getNumDataFormats() |
XSSFCellStyle |
getStyleAt(int idx) |
int |
putBorder(XSSFCellBorder border)
Adds a border to the border style table if it isn't already in the style table Does nothing if border is already in borders style table
(如果边框样式表中还没有边框,则将边框添加到边框样式表中 如果边框已经在边框样式表中,则不执行任何操作)
|
int |
putFill(XSSFCellFill fill)
Adds a fill to the fill style table if it isn't already in the style table Does nothing if fill is already in fill style table
(如果样式表中没有填充样式表,则将填充添加到样式表中 如果填充样式表中已有填充,则不执行任何操作)
|
int |
putFont(XSSFFont font)
Records the given font in the font table.
(在字体表中记录给定的字体。)
|
int |
putFont(XSSFFont font, boolean forceRegistration)
Records the given font in the font table.
(在字体表中记录给定的字体。)
|
void |
putNumberFormat(short index, java.lang.String fmt)
Add a number format with a specific ID into the numberFormats map.
(将具有特定 ID 的数字格式添加到 numberFormats 映射中。)
|
int |
putNumberFormat(java.lang.String fmt)
Puts
fmt in the numberFormats map if the format is not already in the the number format style table.
(如果格式不在数字格式样式表中,则将 fmt 放入 numberFormats 映射中。)
|
int |
putStyle(XSSFCellStyle style) |
boolean |
removeNumberFormat(short index)
Remove a number format from the style table if it exists.
(如果存在,请从样式表中删除数字格式。)
|
boolean |
removeNumberFormat(java.lang.String fmt)
Remove a number format from the style table if it exists All cell styles with this number format will be modified to use the default number format
(从样式表中删除数字格式(如果存在) 所有具有此数字格式的单元格样式将被修改为使用默认数字格式)
|
java.lang.String getNumberFormatAt(short fmtId)
fmtId
- number format id
(fmtId - 数字格式 ID)
int putNumberFormat(java.lang.String fmt)
fmt
in the numberFormats map if the format is not already in the the number format style table. Does nothing if
fmt
is already in number format style table.
(如果格式不在数字格式样式表中,则将 fmt 放入 numberFormats 映射中。如果 fmt 已经在数字格式样式表中,则不执行任何操作。)
fmt
- the number format to add to number format style table
(fmt - 添加到数字格式样式表的数字格式)
fmt
in the number format style table
(数字格式样式表中 fmt 的索引)
java.lang.IllegalStateException
- if adding the number format to the styles table would exceed the max allowed.
(java.lang.IllegalStateException - 如果将数字格式添加到样式表将超过允许的最大值。)
void putNumberFormat(short index, java.lang.String fmt)
fmt
This may be used to override built-in number formats.
(将具有特定 ID 的数字格式添加到 numberFormats 映射中。如果已存在具有相同 ID 的格式,则使用 fmt 覆盖格式代码这可用于覆盖内置数字格式。)
index
- the number format ID
(index - 数字格式 ID)
fmt
- the number format code
(fmt - 数字格式代码)
boolean removeNumberFormat(short index)
index
- the number format id to remove
(index - 要删除的数字格式 ID)
boolean removeNumberFormat(java.lang.String fmt)
fmt
- the number format to remove
(fmt - 要删除的数字格式)
XSSFFont getFontAt(int idx)
int putFont(XSSFFont font, boolean forceRegistration)
XSSFFont.registerTo(StylesTable)
(在字体表中记录给定的字体。如果此字体与另一个字体匹配,将重新使用现有字体索引,除非请求强制注册。这允许人们创建几种字体,然后在以后对其进行自定义。注意 - 最终用户可能想要调用 XSSFFont.registerTo(StylesTable))
int putFont(XSSFFont font)
XSSFCellStyle getStyleAt(int idx)
idx
- style index
(idx - 风格索引)
int putStyle(XSSFCellStyle style)
XSSFCellBorder getBorderAt(int idx)
int putBorder(XSSFCellBorder border)
border
- border to add
(边框 - 要添加的边框)
XSSFCellFill getFillAt(int idx)
int putFill(XSSFCellFill fill)
fill
- fill to add
(填充 - 填充添加)
int getNumCellStyles()
int getNumDataFormats()
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.