SpreadJS Documentation
TableStyle Method
GC.Spread.Sheets Namespace > Tables type : TableStyle Method
The background color of the table.
The foreground color of the table.
The font.
The left border line of the table.
The top border line of the table.
The right border line of the table.
The bottom border line of the table.
The horizontal border line of the table.
The vertical border line of the table.
The text decoration of the table.
Represents table style information.
Syntax
var value; // Type: any
value = GC.Spread.Sheets.Tables.TableStyle(backColor,
                                           foreColor,
                                           font,
                                           borderLeft,
                                           borderTop,
                                           borderRight,
                                           borderBottom,
                                           borderHorizontal,
                                           borderVertical,
                                           textDecoration);
function TableStyle( 
   backColor : string,
   foreColor : string,
   font : string,
   borderLeft : LineBorder,
   borderTop : LineBorder,
   borderRight : LineBorder,
   borderBottom : LineBorder,
   borderHorizontal : LineBorder,
   borderVertical : LineBorder,
   textDecoration : TextDecorationType
) : any;

Parameters

backColor
The background color of the table.
foreColor
The foreground color of the table.
font
The font.
borderLeft
The left border line of the table.
borderTop
The top border line of the table.
borderRight
The right border line of the table.
borderBottom
The bottom border line of the table.
borderHorizontal
The horizontal border line of the table.
borderVertical
The vertical border line of the table.
textDecoration
The text decoration of the table.
Example
//This example creates a table.
var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
var tableStyleInfo = new GC.Spread.Sheets.Tables.TableStyle(
    "black",
    "white",
    "bold 11pt arial",
    new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin),
    new GC.Spread.Sheets.LineBorder("red", GC.Spread.Sheets.LineStyle.thick),
    new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.thin),
    new GC.Spread.Sheets.LineBorder("blue", GC.Spread.Sheets.LineStyle.thick));
tableStyle.headerRowStyle(tableStyleInfo);
var table = activeSheet.tables.add("table1", 1, 1, 5, 5, tableStyle);
See Also

Reference

Tables type