SpreadJS Documentation
GC.Spread.Sheets Namespace / Workbook type / addCustomName Method
The custom name.
The formula.
The row index.
The column index.
The custom comment.
In This Topic
    addCustomName Method
    In This Topic
    Adds a custom name.
    Syntax
    var instance = new GC.Spread.Sheets.Workbook(host,
                                                options,
                                                options.sheetCount,
                                                options.font,
                                                options.allowUserDragMerge,
                                                options.allowUserDragDrop,
                                                options.allowUserDragFill,
                                                options.allowUserZoom,
                                                options.allowUserResize,
                                                options.allowUndo,
                                                options.allowSheetReorder,
                                                options.allowContextMenu,
                                                options.allowUserDeselect,
                                                options.defaultDragFillType,
                                                options.showDragFillSmartTag,
                                                options.showHorizontalScrollbar,
                                                options.showVerticalScrollbar,
                                                options.scrollbarShowMax,
                                                options.scrollbarMaxAlign,
                                                options.tabStripVisible,
                                                options.tabStripRatio,
                                                options.tabEditable,
                                                options.newTabVisible,
                                                options.tabNavigationVisible,
                                                options.cutCopyIndicatorVisible,
                                                options.cutCopyIndicatorBorderColor,
                                                options.backColor,
                                                options.backgroundImage,
                                                options.backgroundImageLayout,
                                                options.grayAreaBackColor,
                                                options.showResizeTip,
                                                options.showDragDropTip,
                                                options.showDragFillTip,
                                                options.showScrollTip,
                                                options.scrollIgnoreHidden,
                                                options.highlightInvalidData,
                                                options.useTouchLayout,
                                                options.hideSelection,
                                                options.resizeZeroIndicator,
                                                options.allowUserEditFormula,
                                                options.enableFormulaTextbox,
                                                options.autoFitType,
                                                options.referenceStyle,
                                                options.calcOnDemand,
                                                options.allowCopyPasteExcelStyle,
                                                options.allowExtendPasteRange,
                                                options.copyPasteHeaderOptions,
                                                options.scrollByPixel,
                                                options.scrollPixel,
                                                options.customList);
    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