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
ConstructorDescriptionDefines 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 TypeMethodDescriptionClone()
Creates and returns a copy of this object.int
Returns the type of this autoformat.Returns the style applied to the bottom left cell.Returns the style applied to the bottom right cell.Returns the style applied to the even columns.Returns the style applied to the even rows.Returns the style applied to the footer row.Returns the style applied to the header row.Returns the style applied to the left column.Returns the style applied to the odd columns.Returns the style applied to the odd rows.Returns the style applied to the right column.Returns the style applied to the table.Returns the style applied to the top left cell.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.Methods inherited from class System.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
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
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
Defines a table autoformat based on a predefined autoformat.- Parameters:
xlsAutoFormat
- the table autoformat
-
-
Method Details
-
setTableStyle
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
Returns the style applied to the table.- Returns:
- the style applied to the table
- See Also:
setTableStyle(EasyXLS.ExcelStyle)
,getHeaderRowStyle()
,getFooterRowStyle()
,getLeftColumnStyle()
,getRightColumnStyle()
-
setHeaderRowStyle
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
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()
-
setLeftColumnStyle
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Creates and returns a copy of this object.- Returns:
- a clone of this instance.
-