| Modifier and Type | Method and Description |
|---|---|
| public void | cloneStyleFrom(CellStyle source)
Clones all the style information from another CellStyle, onto this one. |
| public HorizontalAlignment | Returns: align - the type of alignmentget the type of horizontal alignment for the cell |
| public BorderStyle | Returns: border typeget the type of border to use for the bottom border of the cell |
| public BorderStyle | |
| public BorderStyle | |
| public BorderStyle | |
| public short | Returns: the index of the color definitionget the color to use for the left border |
| public short | |
| public String | |
| public short | Returns: fill color index, or 0 if not indexed (XSSF only)get the background fill color, if the fill is defined with an indexed color. |
| public Color | getFillBackgroundColorColor()
Gets the color object representing the current background fill, resolving indexes using the supplied workbook. |
| public short | Returns: fill color, or 0 if not indexed (XSSF only)get the foreground fill color, if the fill is defined with an indexed color. |
| public Color | getFillForegroundColorColor()
Gets the color object representing the current foreground fill, resolving indexes using the supplied workbook. |
| public FillPatternType | Returns: the fill pattern, default value isFillPatternType#NO_FILLGet the fill pattern |
| public int | |
| public int | |
| public boolean | Returns: hidden - whether the cell using this style should be hiddenget whether the cell's using this style are to be hidden |
| public short | Returns: indent - number of spacesget the number of spaces to indent the text in the cell |
| public short | Returns: unique index number of the underlying record this style represents (probably you don't care unless you're comparing which one is which)get the index within the Workbook (sequence within the collection of ExtendedFormat objects) |
| public short | |
| public boolean | Returns: hidden - whether the cell using this style should be lockedget whether the cell's using this style are to be locked |
| public boolean | |
| public short | Returns: the index of the color definitionget the color to use for the left border |
| public short | Returns: rotation degrees (see note above)get the degree of rotation for the text in the cell. |
| public boolean | getShrinkToFit()
Should the Cell be auto-sized by Excel to shrink it to fit if this text is too long? |
| public short | Returns: the index of the color definitionget the color to use for the top border |
| public VerticalAlignment | Returns: align the type of alignmentget the type of vertical alignment for the cell |
| public boolean | |
| public void | setAlignment(HorizontalAlignment
- the type of alignment align)set the type of horizontal alignment for the cell |
| public void | setBorderBottom(BorderStyle
type border)set the type of border to use for the bottom border of the cell |
| public void | |
| public void | setBorderRight(BorderStyle
type border)set the type of border to use for the right border of the cell |
| public void | |
| public void | setBottomBorderColor(short
The index of the color definition color)set the color to use for the bottom border |
| public void | |
| public void | |
| public void | setFillBackgroundColor(Color
org.apache.poi.ss.usermodel.Color to set color)Set the background fill color. |
| public void | setFillForegroundColor(short
color bg)set the foreground fill color Note Ensure Foreground color is set prior to background color. |
| public void | setFillForegroundColor(Color
org.apache.poi.ss.usermodel.Color to set color)Set the foreground fill color. |
| public void | setFillPattern(FillPatternType
fill pattern (set to fp)FillPatternType#SOLID_FOREGROUND to fill w/foreground color)setting to one fills the cell with the foreground color... |
| public void | |
| public void | setHidden(boolean
- whether the cell using this style should be hidden hidden)set the cell's using this style to be hidden |
| public void | |
| public void | setLeftBorderColor(short
The index of the color definition color)set the color to use for the left border |
| public void | setLocked(boolean
- whether the cell using this style should be locked locked)set the cell's using this style to be locked |
| public void | setQuotePrefixed(boolean quotePrefix)
Turn on or off "Quote Prefix" or "123 Prefix" for the style, which is used to tell Excel that the thing which looks like a number or a formula shouldn't be treated as on. |
| public void | setRightBorderColor(short
The index of the color definition color)set the color to use for the right border |
| public void | setRotation(short
degrees (see note above) rotation)set the degree of rotation for the text in the cell. |
| public void | setShrinkToFit(boolean shrinkToFit)
Controls if the Cell should be auto-sized to shrink to fit if the text is too long |
| public void | setTopBorderColor(short
The index of the color definition color)set the color to use for the top border |
| public void | setVerticalAlignment(VerticalAlignment
the type of alignment align)set the type of vertical alignment for the cell |
| public void |
| cloneStyleFrom | back to summary |
|---|---|
| public void cloneStyleFrom(CellStyle source) Clones all the style information from another CellStyle, onto this one. This CellStyle will then have all the same properties as the source, but the two may be edited independently. Any stylings on this CellStyle will be lost! The source CellStyle could be from another Workbook if you like. This allows you to copy styles from one Workbook to another. However, both of the CellStyles will need to be of the same type (HSSFCellStyle or XSSFCellStyle) | |
| getAlignment | back to summary |
|---|---|
| public HorizontalAlignment getAlignment() get the type of horizontal alignment for the cell
| |
| getBorderBottom | back to summary |
|---|---|
| public BorderStyle getBorderBottom() get the type of border to use for the bottom border of the cell
| |
| getBorderLeft | back to summary |
|---|---|
| public BorderStyle getBorderLeft() get the type of border to use for the left border of the cell
| |
| getBorderRight | back to summary |
|---|---|
| public BorderStyle getBorderRight() get the type of border to use for the right border of the cell
| |
| getBorderTop | back to summary |
|---|---|
| public BorderStyle getBorderTop() get the type of border to use for the top border of the cell
| |
| getBottomBorderColor | back to summary |
|---|---|
| public short getBottomBorderColor() get the color to use for the left border
| |
| getDataFormat | back to summary |
|---|---|
| public short getDataFormat() get the index of the data format. Built in formats are defined at
| |
| getDataFormatString | back to summary |
|---|---|
| public String getDataFormatString() Get the format string | |
| getFillBackgroundColor | back to summary |
|---|---|
| public short getFillBackgroundColor() get the background fill color, if the fill is defined with an indexed color.
| |
| getFillBackgroundColorColor | back to summary |
|---|---|
| public Color getFillBackgroundColorColor() Gets the color object representing the current background fill, resolving indexes using the supplied workbook. This will work for both indexed and rgb defined colors. | |
| getFillForegroundColor | back to summary |
|---|---|
| public short getFillForegroundColor() get the foreground fill color, if the fill is defined with an indexed color.
| |
| getFillForegroundColorColor | back to summary |
|---|---|
| public Color getFillForegroundColorColor() Gets the color object representing the current foreground fill, resolving indexes using the supplied workbook. This will work for both indexed and rgb defined colors. | |
| getFillPattern | back to summary |
|---|---|
| public FillPatternType getFillPattern() Get the fill pattern
| |
| getFontIndex | back to summary |
|---|---|
| public int getFontIndex() gets the index of the font for this style
| |
| getFontIndexAsInt | back to summary |
|---|---|
| public int getFontIndexAsInt()
Deprecated use gets the index of the font for this style
| |
| getHidden | back to summary |
|---|---|
| public boolean getHidden() get whether the cell's using this style are to be hidden
| |
| getIndention | back to summary |
|---|---|
| public short getIndention() get the number of spaces to indent the text in the cell
| |
| getIndex | back to summary |
|---|---|
| public short getIndex() get the index within the Workbook (sequence within the collection of ExtendedFormat objects)
| |
| getLeftBorderColor | back to summary |
|---|---|
| public short getLeftBorderColor() get the color to use for the left border | |
| getLocked | back to summary |
|---|---|
| public boolean getLocked() get whether the cell's using this style are to be locked
| |
| getQuotePrefixed | back to summary |
|---|---|
| public boolean getQuotePrefixed() Is "Quote Prefix" or "123 Prefix" enabled for the cell?
Having this on is somewhat (but not completely, see | |
| getRightBorderColor | back to summary |
|---|---|
| public short getRightBorderColor() get the color to use for the left border
| |
| getRotation | back to summary |
|---|---|
| public short getRotation() get the degree of rotation for the text in the cell. Note HSSF uses values from -90 to 90 degrees, whereas XSSF uses values from 0 to 180 degrees. The implementations of this method will map between these two value-ranges value-range as used by the type of Excel file-format that this CellStyle is applied to.
| |
| getShrinkToFit | back to summary |
|---|---|
| public boolean getShrinkToFit() Should the Cell be auto-sized by Excel to shrink it to fit if this text is too long? | |
| getTopBorderColor | back to summary |
|---|---|
| public short getTopBorderColor() get the color to use for the top border
| |
| getVerticalAlignment | back to summary |
|---|---|
| public VerticalAlignment getVerticalAlignment() get the type of vertical alignment for the cell
| |
| getWrapText | back to summary |
|---|---|
| public boolean getWrapText() get whether the text should be wrapped
| |
| setAlignment | back to summary |
|---|---|
| public void setAlignment(HorizontalAlignment align) set the type of horizontal alignment for the cell
| |
| setBorderBottom | back to summary |
|---|---|
| public void setBorderBottom(BorderStyle border) set the type of border to use for the bottom border of the cell
| |
| setBorderLeft | back to summary |
|---|---|
| public void setBorderLeft(BorderStyle border) set the type of border to use for the left border of the cell
| |
| setBorderRight | back to summary |
|---|---|
| public void setBorderRight(BorderStyle border) set the type of border to use for the right border of the cell
| |
| setBorderTop | back to summary |
|---|---|
| public void setBorderTop(BorderStyle border) set the type of border to use for the top border of the cell
| |
| setBottomBorderColor | back to summary |
|---|---|
| public void setBottomBorderColor(short color) set the color to use for the bottom border
| |
| setDataFormat | back to summary |
|---|---|
| public void setDataFormat(short fmt) set the data format (must be a valid format). Built in formats are defined at
| |
| setFillBackgroundColor | back to summary |
|---|---|
| public void setFillBackgroundColor(short bg) set the background fill color.
| |
| setFillBackgroundColor | back to summary |
|---|---|
| public void setFillBackgroundColor(Color color) Set the background fill color.
Uses a
| |
| setFillForegroundColor | back to summary |
|---|---|
| public void setFillForegroundColor(short bg) set the foreground fill color Note Ensure Foreground color is set prior to background color.
| |
| setFillForegroundColor | back to summary |
|---|---|
| public void setFillForegroundColor(Color color) Set the foreground fill color.
Uses a
| |
| setFillPattern | back to summary |
|---|---|
| public void setFillPattern(FillPatternType fp) setting to one fills the cell with the foreground color... No idea about other values
| |
| setFont | back to summary |
|---|---|
| public void setFont(Font font) set the font for this style
| |
| setHidden | back to summary |
|---|---|
| public void setHidden(boolean hidden) set the cell's using this style to be hidden
| |
| setIndention | back to summary |
|---|---|
| public void setIndention(short indent) set the number of spaces to indent the text in the cell
| |
| setLeftBorderColor | back to summary |
|---|---|
| public void setLeftBorderColor(short color) set the color to use for the left border
| |
| setLocked | back to summary |
|---|---|
| public void setLocked(boolean locked) set the cell's using this style to be locked
| |
| setQuotePrefixed | back to summary |
|---|---|
| public void setQuotePrefixed(boolean quotePrefix) Turn on or off "Quote Prefix" or "123 Prefix" for the style,
which is used to tell Excel that the thing which looks like
a number or a formula shouldn't be treated as on.
Turning this on is somewhat (but not completely, see | |
| setRightBorderColor | back to summary |
|---|---|
| public void setRightBorderColor(short color) set the color to use for the right border
| |
| setRotation | back to summary |
|---|---|
| public void setRotation(short rotation) set the degree of rotation for the text in the cell. Note HSSF uses values from -90 to 90 degrees, whereas XSSF uses values from 0 to 180 degrees. The implementations of this method will map between these two value-ranges accordingly, however the corresponding getter is returning values in the range mandated by the current type of Excel file-format that this CellStyle is applied to.
| |
| setShrinkToFit | back to summary |
|---|---|
| public void setShrinkToFit(boolean shrinkToFit) Controls if the Cell should be auto-sized to shrink to fit if the text is too long | |
| setTopBorderColor | back to summary |
|---|---|
| public void setTopBorderColor(short color) set the color to use for the top border
| |
| setVerticalAlignment | back to summary |
|---|---|
| public void setVerticalAlignment(VerticalAlignment align) set the type of vertical alignment for the cell
| |
| setWrapText | back to summary |
|---|---|
| public void setWrapText(boolean wrapped) Set whether the text should be wrapped.
Setting this flag to
| |