formula

Gets or sets the formula of the cells.

Parameters

formula String optional

The new formula of the cell. The string may optionally start with =.

Returns

String the formula of the top-left cell of the range.

Example

    <div id="spreadsheet"></div>
    <script type="text/javascript" charset="utf-8">

        $("#spreadsheet").kendoSpreadsheet();

        var spreadsheet = $("#spreadsheet").data("kendoSpreadsheet");

        var sheet = spreadsheet.activeSheet();

        sheet.range("A1").input("1000");
        sheet.range("A2").formula("A1*2");
        console.log(sheet.range("A2").formula()); // "A1*2"
    </script>

In this article
Not finding the help you need? Improve this article