SpreadJS: show headers even for empty sheets

581 views Asked by At

Library name: [GrapeCity's SpreadJS][1]

Need to show header even for empty sheets.
Right now, for an empty sheet, I only have this picture, no header.

Anybody have idea how to do it?

EDIT: Table header missingTable header missing

1

There are 1 answers

3
MESCIUS Team On

You are able to customize your spreadsheets column header when initializing SpreadJS by setting the value of the column header like so:

$(document).ready(function ()
{
    var spread =
    new GC.Spread.Sheets.Workbook(document.getElementById("ss"),{sheetCount:3});
    var sheet = spread.getActiveSheet();
    // Set the desired string in column headers
    sheet.setValue(0, 1, "Column Header", GC.Spread.Sheets.SheetArea.colHeader);
    sheet.setColumnWidth(1, 120.0,GC.Spread.Sheets.SheetArea.colHeader);
}); 

Here is a link to SpreadJS docs for an additional reference: https://www.grapecity.com/spreadjs/docs/v14/online/sccustheader.html