Class ExcelCellStyle
java.lang.Object
com.northconcepts.datapipeline.excel.ExcelCellStyle
- All Implemented Interfaces:
Cloneable
Represents the styling properties that can be applied to an Excel cell.
Includes font, background color, text wrapping, and data format options.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ExcelCellStyleclone()booleanGets the background color of the cell.Gets the data format string for the cell (e.g., "0.00" for decimals, "m/d/yy" for dates).Gets the font styling for the cell.inthashCode()static final ExcelCellStyleReturns a new ExcelCellStyle that is underlined with a blue font color.static final ExcelCellStylehyperlink(ExcelCellStyle style) Decorates the supplied style making it underlined with a blue font color.booleanReturns whether text wrapping is enabled for the cell.setBackgroundColor(ExcelColor backgroundColor) Sets the background color of the cell.setBackgroundColor(ExcelColorPalette backgroundColorPalette) Sets the background color of the cell.setDataFormat(String dataFormat) Sets the data format string for the cell (e.g., "0.00" for decimals, "m/d/yy" for dates).setExcelFont(ExcelFont excelFont) Sets the font styling for the cell.setWrapText(boolean wrapText) Sets whether text wrapping is enabled for the cell.toString()
-
Constructor Details
-
ExcelCellStyle
public ExcelCellStyle()
-
-
Method Details
-
hyperlink
Returns a new ExcelCellStyle that is underlined with a blue font color. -
hyperlink
Decorates the supplied style making it underlined with a blue font color. Existing font attributes (e.g., bold, italic, size) are preserved. -
isWrapText
public boolean isWrapText()Returns whether text wrapping is enabled for the cell.- Returns:
- true if text wrapping is enabled, false otherwise
-
setWrapText
Sets whether text wrapping is enabled for the cell.- Parameters:
wrapText- true to enable text wrapping, false to disable- Returns:
- this ExcelCellStyle instance for method chaining
-
getBackgroundColor
Gets the background color of the cell.- Returns:
- the background color
-
setBackgroundColor
Sets the background color of the cell.- Parameters:
backgroundColor- the background color to set- Returns:
- this ExcelCellStyle instance for method chaining
-
setBackgroundColor
Sets the background color of the cell.- Parameters:
backgroundColorPalette- the background color to set- Returns:
- this ExcelCellStyle instance for method chaining
-
getExcelFont
Gets the font styling for the cell.- Returns:
- the Excel font
-
setExcelFont
Sets the font styling for the cell.- Parameters:
excelFont- the Excel font to set- Returns:
- this ExcelCellStyle instance for method chaining
-
getDataFormat
Gets the data format string for the cell (e.g., "0.00" for decimals, "m/d/yy" for dates).- Returns:
- the data format string
-
setDataFormat
Sets the data format string for the cell (e.g., "0.00" for decimals, "m/d/yy" for dates).- Parameters:
dataFormat- the data format string to set- Returns:
- this ExcelCellStyle instance for method chaining
-
hashCode
public int hashCode() -
equals
-
toString
-
clone
-