SpreadJS Documentation
findTableByName Method
The table name.
Gets the table with a specified name.
Syntax
var instance = new GcSpread.Sheets.Sheet(name);
var value; // Type: SheetTable
value = instance.findTableByName(name);
function findTableByName( 
   name : string
) : SheetTable;

Parameters

name
The table name.

Return Value

The table instance if the cell belongs to a table; otherwise, null.
Example
This example finds the table by name.
var activeSheet = spread.getActiveSheet();

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 () {
var table  = activeSheet.findTableByName("Table1");
alert(table);
activeSheet.moveTableByName("Table1", 3, 3);
    });
See Also

Reference

Sheet type
Creating Tables

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.