SpreadJS Documentation
resizeTableByName Method
The name of the table to resize.
The new table range. The headers must remain in the same row, and the resulting table range must overlap the original table range.
Changes the table size.
Syntax
var instance = new GcSpread.Sheets.Sheet(name);
var value; // Type: Sheet
value = instance.resizeTableByName(name, range);
function resizeTableByName( 
   name : string,
   range : Range
) : Sheet;

Parameters

name
The name of the table to resize.
range
The new table range. The headers must remain in the same row, and the resulting table range must overlap the original table range.

Return Value

The sheet that contains the table.
Example
This example resizes the table.
activeSheet.addTable("Table1", 0, 0, 3, 3, GcSpread.Sheets.TableStyles.dark1());
activeSheet.getCell(0,0).text("Name");
activeSheet.getCell(0,1).text("Value");
activeSheet.getCell(0,2).text("T/F");
activeSheet.getCell(1,0).text("AW");
activeSheet.getCell(1,1).text("5");
activeSheet.getCell(1,2).text("T");

$("#button1").click(function () {
activeSheet.resizeTableByName("Table1", 4, 3);
//or
//activeSheet.resizeTableByName("Table1", new GcSpread.Sheets.Range(0,0,4,3));
    });
See Also

Reference

Sheet type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.