SpreadJS Documentation
addCustomName Method
The custom name.
The formula to set.
The base row of the custom name.
The base column of the custom name.
Adds a custom name for the specified area.
Syntax
var instance = new GcSpread.Sheets.Sheet(name);
var value; // Type: any
value = instance.addCustomName(name, formula, baseRow, baseCol);
function addCustomName( 
   name : string,
   formula : string,
   baseRow : number,
   baseCol : number
) : any;

Parameters

name
The custom name.
formula
The formula to set.
baseRow
The base row of the custom name.
baseCol
The base column of the custom name.
Example
This example creates custom names.
sheet.setValue(0, 0, 1);
sheet.setValue(0, 1, 2);
sheet.setValue(0, 2, 3);
sheet.addCustomName("customName1","=12", 0, 0);
sheet.addCustomName("customName2","Average(20,45)", 0, 0);
sheet.addCustomName("customName3", "=$A$1:$C$1", 0, 0);
sheet.setFormula(1, 0, "customName1");
sheet.setFormula(1, 1, "customName2");
sheet.setFormula(1, 2, "sum(customName3)");
See Also

Reference

Sheet type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.