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
|
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.
|
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. |
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 idint 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
- the number format to add to number format style tablefmt
in the number format style tablejava.lang.IllegalStateException
- if adding the number format to the styles table
would exceed the max allowed.void putNumberFormat(short index, java.lang.String fmt)
fmt
This may be used to override built-in number formats.index
- the number format IDfmt
- the number format codeboolean removeNumberFormat(short index)
index
- the number format id to removeboolean removeNumberFormat(java.lang.String fmt)
fmt
- the number format to removeXSSFFont getFontAt(int idx)
int putFont(XSSFFont font, boolean forceRegistration)
XSSFFont.registerTo(StylesTable)
int putFont(XSSFFont font)
XSSFCellStyle getStyleAt(int idx)
idx
- style indexint putStyle(XSSFCellStyle style)
XSSFCellBorder getBorderAt(int idx)
int putBorder(XSSFCellBorder border)
border
- border to addXSSFCellFill getFillAt(int idx)
int putFill(XSSFCellFill fill)
fill
- fill to addint getNumCellStyles()
int getNumDataFormats()
Copyright 2020 The Apache Software Foundation or its licensors, as applicable.