SpreadJS Documentation
addCustomName Method
GC.Spread.Sheets Namespace > Workbook type : addCustomName Method
The custom name.
The formula.
The row index.
The column index.
The custom comment.
Adds a custom name.
Syntax
var instance = new GC.Spread.Sheets.Workbook(host);
var value; // Type: any
value = instance.addCustomName(name, formula, baseRow, baseCol, comment);
function addCustomName( 
   name : string,
   formula : string,
   baseRow : number,
   baseCol : number,
   comment : string
) : any;

Parameters

name
The custom name.
formula
The formula.
baseRow
The row index.
baseCol
The column index.
comment
The custom comment.
Example
This example uses the addCustomName method.
activeSheet.setValue(0, 0, 1);
activeSheet.setValue(0, 1, 2);
activeSheet.setValue(0, 2, 3);
spread.addCustomName("customName1","=12", 0, 0);
activeSheet.setFormula(1, 0, "customName1");
//spread.clearCustomNames();
See Also

Reference

Workbook type
Creating Custom Names