SpreadJS Documentation
firstFooterCellStyle Method
The style of the first footer cell.
Syntax
var instance = new GcSpread.Sheets.TableStyle();
var value; // Type: any
value = instance.firstFooterCellStyle();
function firstFooterCellStyle() : any;

Return Value

Returns the style of the first footer cell. If the style is not set, it returns the table style.
Example
This example creates a table.
//Add data
for (var col = 1; col < 6; col++) {
    for (var row = 2; row < 11; row++) {
        activeSheet.setValue(row, col, row + col);
    }
}
 
var tableStyle = new GcSpread.Sheets.TableStyle();
var thinBorder = new GcSpread.Sheets.LineBorder("black", GcSpread.Sheets.LineStyle.dotted);
tableStyle.wholeTableStyle(new GcSpread.Sheets.TableStyleInfo("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
var tStyleInfo = new GcSpread.Sheets.TableStyleInfo();
tStyleInfo.backColor = "green";
tStyleInfo.foreColor = "red";
tStyleInfo.borderBottom = new GcSpread.Sheets.LineBorder("green", GcSpread.Sheets.LineStyle.thin);
tStyleInfo.borderLeft = new GcSpread.Sheets.LineBorder("yellow", GcSpread.Sheets.LineStyle.medium);
tStyleInfo.borderTop = new GcSpread.Sheets.LineBorder("green", GcSpread.Sheets.LineStyle.thin);
tStyleInfo.borderRight = new GcSpread.Sheets.LineBorder("green", GcSpread.Sheets.LineStyle.thin);
tStyleInfo.font = "bold 11pt arial";
tableStyle.lastFooterCellStyle(tStyleInfo);
tableStyle.firstFooterCellStyle(tStyleInfo);
 
var sTable = activeSheet.addTable("table1", 1, 1, 10, 5, tableStyle);
sTable.showFooter(true);
//set footer value
sTable.setColumnValue(0, "Total");
//set footer formula
sTable.setColumnFormula(4, "SUM(F3:F11)");
sTable.highlightFirstColumn(true);
sTable.highlightLastColumn(true);
See Also

Reference

TableStyle type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.