SheetAPI.applyTableTpl method is used to apply table template to a range of cells.
Parameters
var json = {
fileName: 'Table Sheet',
sheets: [
{name: 'One tab', id: 1, color: 'orange' }
],
cells: [
{sheet: 1, row: 16, col: 6, json: { data: "CATEGORY" }},
{sheet: 1, row: 16, col: 7, json: { data: "ESTIMATED"}},
{sheet: 1, row: 16, col: 8, json: { data: "ACTUAL" }},
{sheet: 1, row: 17, col: 6, json: { data: "Bouquets"}},
{sheet: 1, row: 17, col: 7, json: { data: "500"}},
{sheet: 1, row: 17, col: 8, json: { data: "450" }},
{sheet: 1, row: 18, col: 6, json: { data: "Boutonnires" } },
{sheet: 1, row: 18, col: 7, json: { data: "200" }},
{sheet: 1, row: 18, col: 8, json: { data: "150" }},
{sheet: 1, row: 19, col: 6, json: { data: "Corsages"}},
{sheet: 1, row: 19, col: 7, json: { data: "100"}},
{sheet: 1, row: 19, col: 8, json: { data: "80" }}
]
};
SHEET_API.loadData(SHEET_API_HD, json, function() {
SHEET_API.applyTableTpl(SHEET_API_HD, 1, 16, 6, 19, 8, "tpl_50", false);
}, this);
applyTableTpl should be called after data are successfully rendered.