Namespace EasyXLS
Class ExcelAutoFormat
- System.Object
-
- EasyXLS.ExcelAutoFormat
-
public class ExcelAutoFormat extends System.Object
This class stores the table autoformat information like font name, font size, font bold, font italic, word wrap, font underline style, font subscript, font superscript, font strikethrough, background color, foreground color, horizontal alignment, vertical alignment, number or date format, cell locked or hidden, shrink, border type, border color. A table autoformat can be applied to a range of cells.
-
-
Constructor Summary
Constructors Constructor Description ExcelAutoFormat()
Defines a table autoformat that is initialized with the default style.ExcelAutoFormat(int autoformat)
Defines a table autoformat that is one of the predefined autoformats.ExcelAutoFormat(ExcelAutoFormat xlsAutoFormat)
Defines a table autoformat based on a predefined autoformat.ExcelAutoFormat(ExcelStyle xlsStyleTable)
Defines a table autoformat that is initialized with a specific style.ExcelAutoFormat(ExcelStyle xlsStyleTable, ExcelStyle xlsStyleTableHeaderRow, ExcelStyle xlsStyleTableFooterRow)
Defines a table autoformat that is initialized with a specific style and has a specific header row and footer row style.ExcelAutoFormat(ExcelStyle xlsStyleEvenRowStripes, ExcelStyle xlsStyleOddRowStripes, ExcelStyle xlsStyleTableHeaderRow, ExcelStyle xlsStyleTableFooterRow)
Defines a table autoformat that is initialized with a specific striped style and has a specific header row and footer row style.
-
Method Summary
Modifier and Type Method Description ExcelAutoFormat
Clone()
Creates and returns a copy of this object.int
getAutoFormatType()
Returns the type of this autoformat.ExcelStyle
getBottomLeftCellStyle()
Returns the style applied to the bottom left cell.ExcelStyle
getBottomRightCellStyle()
Returns the style applied to the bottom right cell.ExcelStyle
getEvenColumnStripesStyle()
Returns the style applied to the even columns.ExcelStyle
getEvenRowStripesStyle()
Returns the style applied to the even rows.ExcelStyle
getFooterRowStyle()
Returns the style applied to the footer row.ExcelStyle
getHeaderRowStyle()
Returns the style applied to the header row.ExcelStyle
getLeftColumnStyle()
Returns the style applied to the left column.ExcelStyle
getOddColumnStripesStyle()
Returns the style applied to the odd columns.ExcelStyle
getOddRowStripesStyle()
Returns the style applied to the odd rows.ExcelStyle
getRightColumnStyle()
Returns the style applied to the right column.ExcelStyle
getTableStyle()
Returns the style applied to the table.ExcelStyle
getTopLeftCellStyle()
Returns the style applied to the top left cell.ExcelStyle
getTopRightCellStyle()
Returns the style applied to the top right cell.void
InitAs(int autoformat)
Initializes the table autoformat that is one of the predefined autoformats.void
setBottomLeftCellStyle(ExcelStyle xlsStyle)
Sets the style of the bottom left cell.void
setBottomRightCellStyle(ExcelStyle xlsStyle)
Sets the style of the bottom right cell.void
setEvenColumnStripesStyle(ExcelStyle xlsStyle)
Sets the style of the even columns.void
setEvenRowStripesStyle(ExcelStyle xlsStyle)
Sets the style of the even rows.void
setFooterRowStyle(ExcelStyle xlsStyle)
Sets the style of the footer row.void
setHeaderRowStyle(ExcelStyle xlsStyle)
Sets the style of the header row.void
setLeftColumnStyle(ExcelStyle xlsStyle)
Sets the style of the left column.void
setOddColumnStripesStyle(ExcelStyle xlsStyle)
Sets the style of the odd columns.void
setOddRowStripesStyle(ExcelStyle xlsStyle)
Sets the style of the odd rows.void
setRightColumnStyle(ExcelStyle xlsStyle)
Sets the style of the right column.void
setTableStyle(ExcelStyle xlsStyle)
Sets the style of the table.void
setTopLeftCellStyle(ExcelStyle xlsStyle)
Sets the style of the top left cell.void
setTopRightCellStyle(ExcelStyle xlsStyle)
Sets the style of the top right cell.
-
-
-
Constructor Detail
-
ExcelAutoFormat
public ExcelAutoFormat()
Defines a table autoformat that is initialized with the default style.
-
ExcelAutoFormat
public ExcelAutoFormat(int autoformat)
Defines a table autoformat that is one of the predefined autoformats.- Parameters:
autoformat
- the predefined autoformat. Possible values are available inStyles
class.
-
ExcelAutoFormat
public ExcelAutoFormat(ExcelStyle xlsStyleTable)
Defines a table autoformat that is initialized with a specific style.- Parameters:
xlsStyleTable
- the style applied to the table
-
ExcelAutoFormat
public ExcelAutoFormat(ExcelStyle xlsStyleTable, ExcelStyle xlsStyleTableHeaderRow, ExcelStyle xlsStyleTableFooterRow)
Defines a table autoformat that is initialized with a specific style and has a specific header row and footer row style.- Parameters:
xlsStyleTable
- the style applied to the tablexlsStyleTableHeaderRow
- the style applied to the header rowxlsStyleTableFooterRow
- the style applied to the footer row
-
ExcelAutoFormat
public ExcelAutoFormat(ExcelStyle xlsStyleEvenRowStripes, ExcelStyle xlsStyleOddRowStripes, ExcelStyle xlsStyleTableHeaderRow, ExcelStyle xlsStyleTableFooterRow)
Defines a table autoformat that is initialized with a specific striped style and has a specific header row and footer row style.- Parameters:
xlsStyleEvenRowStripes
- the style applied to the even rowsxlsStyleOddRowStripes
- the style applied to the odd rowsxlsStyleTableHeaderRow
- the style applied to the header rowxlsStyleTableFooterRow
- the style applied to the footer row
-
ExcelAutoFormat
public ExcelAutoFormat(ExcelAutoFormat xlsAutoFormat)
Defines a table autoformat based on a predefined autoformat.- Parameters:
xlsAutoFormat
- the table autoformat
-
-
Method Detail
-
setTableStyle
public void setTableStyle(ExcelStyle xlsStyle)
Sets the style of the table.- Parameters:
xlsStyle
- the style applied to the table- See Also:
getTableStyle()
,setHeaderRowStyle(EasyXLS.ExcelStyle)
,setFooterRowStyle(EasyXLS.ExcelStyle)
,setLeftColumnStyle(EasyXLS.ExcelStyle)
,setRightColumnStyle(EasyXLS.ExcelStyle)
-
getTableStyle
public ExcelStyle getTableStyle()
Returns the style applied to the table.- Returns:
- the style applied to the table
- See Also:
setTableStyle(EasyXLS.ExcelStyle)
,getHeaderRowStyle()
,getFooterRowStyle()
,getLeftColumnStyle()
,getRightColumnStyle()
-
setHeaderRowStyle
public void setHeaderRowStyle(ExcelStyle xlsStyle)
Sets the style of the header row.- Parameters:
xlsStyle
- the style applied to the header row- See Also:
getHeaderRowStyle()
,setTableStyle(EasyXLS.ExcelStyle)
,setFooterRowStyle(EasyXLS.ExcelStyle)
,setLeftColumnStyle(EasyXLS.ExcelStyle)
,setRightColumnStyle(EasyXLS.ExcelStyle)
-
getHeaderRowStyle
public ExcelStyle getHeaderRowStyle()
Returns the style applied to the header row.- Returns:
- the style applied to the header row
- See Also:
setHeaderRowStyle(EasyXLS.ExcelStyle)
,getTableStyle()
,getFooterRowStyle()
,getLeftColumnStyle()
,getRightColumnStyle()
-
setFooterRowStyle
public void setFooterRowStyle(ExcelStyle xlsStyle)
Sets the style of the footer row.- Parameters:
xlsStyle
- the style applied to the footer row- See Also:
getFooterRowStyle()
,setHeaderRowStyle(EasyXLS.ExcelStyle)
,setTableStyle(EasyXLS.ExcelStyle)
,setLeftColumnStyle(EasyXLS.ExcelStyle)
,setRightColumnStyle(EasyXLS.ExcelStyle)
-
getFooterRowStyle
public ExcelStyle getFooterRowStyle()
Returns the style applied to the footer row.- Returns:
- the style applied to the footer row
- See Also:
setFooterRowStyle(EasyXLS.ExcelStyle)
,getTableStyle()
,getHeaderRowStyle()
,getLeftColumnStyle()
,getRightColumnStyle()
-
setLeftColumnStyle
public void setLeftColumnStyle(ExcelStyle xlsStyle)
Sets the style of the left column.- Parameters:
xlsStyle
- the style applied to the left column- See Also:
getLeftColumnStyle()
,setTableStyle(EasyXLS.ExcelStyle)
,setHeaderRowStyle(EasyXLS.ExcelStyle)
,setFooterRowStyle(EasyXLS.ExcelStyle)
,setRightColumnStyle(EasyXLS.ExcelStyle)
-
getLeftColumnStyle
public ExcelStyle getLeftColumnStyle()
Returns the style applied to the left column.- Returns:
- the style applied to the left column
- See Also:
setLeftColumnStyle(EasyXLS.ExcelStyle)
,getTableStyle()
,getHeaderRowStyle()
,getFooterRowStyle()
,getRightColumnStyle()
-
setRightColumnStyle
public void setRightColumnStyle(ExcelStyle xlsStyle)
Sets the style of the right column.- Parameters:
xlsStyle
- the style applied to the right column- See Also:
getRightColumnStyle()
,setHeaderRowStyle(EasyXLS.ExcelStyle)
,setFooterRowStyle(EasyXLS.ExcelStyle)
,setTableStyle(EasyXLS.ExcelStyle)
,setLeftColumnStyle(EasyXLS.ExcelStyle)
-
getRightColumnStyle
public ExcelStyle getRightColumnStyle()
Returns the style applied to the right column.- Returns:
- the style applied to the right column
- See Also:
setRightColumnStyle(EasyXLS.ExcelStyle)
,getTableStyle()
,getHeaderRowStyle()
,getFooterRowStyle()
,getLeftColumnStyle()
-
setTopLeftCellStyle
public void setTopLeftCellStyle(ExcelStyle xlsStyle)
Sets the style of the top left cell.- Parameters:
xlsStyle
- the style applied to the top left cell- See Also:
getTopLeftCellStyle()
,setTopRightCellStyle(EasyXLS.ExcelStyle)
,setBottomLeftCellStyle(EasyXLS.ExcelStyle)
,setBottomRightCellStyle(EasyXLS.ExcelStyle)
-
getTopLeftCellStyle
public ExcelStyle getTopLeftCellStyle()
Returns the style applied to the top left cell.- Returns:
- the style applied to the top left cell
- See Also:
setTopLeftCellStyle(EasyXLS.ExcelStyle)
,getTopRightCellStyle()
,getBottomLeftCellStyle()
,getBottomRightCellStyle()
-
setTopRightCellStyle
public void setTopRightCellStyle(ExcelStyle xlsStyle)
Sets the style of the top right cell.- Parameters:
xlsStyle
- the style applied to the top right cell- See Also:
getTopRightCellStyle()
,setTopLeftCellStyle(EasyXLS.ExcelStyle)
,setBottomLeftCellStyle(EasyXLS.ExcelStyle)
,setBottomRightCellStyle(EasyXLS.ExcelStyle)
-
getTopRightCellStyle
public ExcelStyle getTopRightCellStyle()
Returns the style applied to the top right cell.- Returns:
- the style applied to the top right cell
- See Also:
setTopRightCellStyle(EasyXLS.ExcelStyle)
,getTopLeftCellStyle()
,getBottomLeftCellStyle()
,getBottomRightCellStyle()
-
setBottomLeftCellStyle
public void setBottomLeftCellStyle(ExcelStyle xlsStyle)
Sets the style of the bottom left cell.- Parameters:
xlsStyle
- the style applied to the bottom left cell- See Also:
getBottomLeftCellStyle()
,setTopLeftCellStyle(EasyXLS.ExcelStyle)
,setTopRightCellStyle(EasyXLS.ExcelStyle)
,setBottomRightCellStyle(EasyXLS.ExcelStyle)
-
getBottomLeftCellStyle
public ExcelStyle getBottomLeftCellStyle()
Returns the style applied to the bottom left cell.- Returns:
- the style applied to the bottom left cell
- See Also:
setBottomLeftCellStyle(EasyXLS.ExcelStyle)
,getTopLeftCellStyle()
,getTopRightCellStyle()
,getBottomRightCellStyle()
-
setBottomRightCellStyle
public void setBottomRightCellStyle(ExcelStyle xlsStyle)
Sets the style of the bottom right cell.- Parameters:
xlsStyle
- the style applied to the bottom right cell- See Also:
getBottomRightCellStyle()
,setTopLeftCellStyle(EasyXLS.ExcelStyle)
,setTopRightCellStyle(EasyXLS.ExcelStyle)
,setBottomLeftCellStyle(EasyXLS.ExcelStyle)
-
getBottomRightCellStyle
public ExcelStyle getBottomRightCellStyle()
Returns the style applied to the bottom right cell.- Returns:
- the style applied to the bottom right cell
- See Also:
setBottomRightCellStyle(EasyXLS.ExcelStyle)
,getTopLeftCellStyle()
,getTopRightCellStyle()
,getBottomLeftCellStyle()
-
setEvenRowStripesStyle
public void setEvenRowStripesStyle(ExcelStyle xlsStyle)
Sets the style of the even rows.- Parameters:
xlsStyle
- the style applied to the even rows- See Also:
getEvenRowStripesStyle()
,setHeaderRowStyle(EasyXLS.ExcelStyle)
,setFooterRowStyle(EasyXLS.ExcelStyle)
,setOddRowStripesStyle(EasyXLS.ExcelStyle)
-
getEvenRowStripesStyle
public ExcelStyle getEvenRowStripesStyle()
Returns the style applied to the even rows.- Returns:
- the style applied to the even rows
- See Also:
setEvenRowStripesStyle(EasyXLS.ExcelStyle)
,getHeaderRowStyle()
,getFooterRowStyle()
,getOddRowStripesStyle()
-
setEvenColumnStripesStyle
public void setEvenColumnStripesStyle(ExcelStyle xlsStyle)
Sets the style of the even columns.- Parameters:
xlsStyle
- the style applied to the even columns- See Also:
getEvenColumnStripesStyle()
,setLeftColumnStyle(EasyXLS.ExcelStyle)
,setRightColumnStyle(EasyXLS.ExcelStyle)
,setOddColumnStripesStyle(EasyXLS.ExcelStyle)
-
getEvenColumnStripesStyle
public ExcelStyle getEvenColumnStripesStyle()
Returns the style applied to the even columns.- Returns:
- the style applied to the even columns
- See Also:
setEvenColumnStripesStyle(EasyXLS.ExcelStyle)
,getLeftColumnStyle()
,getRightColumnStyle()
,getOddColumnStripesStyle()
-
setOddRowStripesStyle
public void setOddRowStripesStyle(ExcelStyle xlsStyle)
Sets the style of the odd rows.- Parameters:
xlsStyle
- the style applied to the odd rows- See Also:
getOddRowStripesStyle()
,setHeaderRowStyle(EasyXLS.ExcelStyle)
,setFooterRowStyle(EasyXLS.ExcelStyle)
,setEvenRowStripesStyle(EasyXLS.ExcelStyle)
-
getOddRowStripesStyle
public ExcelStyle getOddRowStripesStyle()
Returns the style applied to the odd rows.- Returns:
- the style applied to the odd rows
- See Also:
setOddRowStripesStyle(EasyXLS.ExcelStyle)
,getHeaderRowStyle()
,getFooterRowStyle()
,getEvenRowStripesStyle()
-
setOddColumnStripesStyle
public void setOddColumnStripesStyle(ExcelStyle xlsStyle)
Sets the style of the odd columns.- Parameters:
xlsStyle
- the style applied to the odd columns- See Also:
getOddColumnStripesStyle()
,setLeftColumnStyle(EasyXLS.ExcelStyle)
,setRightColumnStyle(EasyXLS.ExcelStyle)
,setEvenColumnStripesStyle(EasyXLS.ExcelStyle)
-
getOddColumnStripesStyle
public ExcelStyle getOddColumnStripesStyle()
Returns the style applied to the odd columns.- Returns:
- the style applied to the odd columns
- See Also:
setOddColumnStripesStyle(EasyXLS.ExcelStyle)
,getLeftColumnStyle()
,getRightColumnStyle()
,getEvenColumnStripesStyle()
-
InitAs
public void InitAs(int autoformat)
Initializes the table autoformat that is one of the predefined autoformats.- Parameters:
autoformat
- the predefined autoformat. Possible values are available inStyles
class.
-
getAutoFormatType
public int getAutoFormatType()
Returns the type of this autoformat.- Returns:
- the type of this autoformat. A list of predefined autoformats is available in
Styles
class. The method returns -1 if the autoformat is user defined.
-
Clone
public ExcelAutoFormat Clone()
Creates and returns a copy of this object.- Returns:
- a clone of this instance.
-
-