input

Gets or sets the value of the cells. This is similar to value, but it parses the argument as if it was entered through the text box:

  • if it starts with = (equal sign), a formula is set. This may throw an error if the formula is syntactically invalid. Example: range("C1").input("=A1+B1").
  • if it looks like a number, a numeric value (not string) is set.
  • if it's true or false (case-insensitive) the respective boolean value is set.
  • if it's a Date object, or a string that can be parsed as a date, it is converted to the numerical representation of the date.
  • if it starts with ' (single quote), a string containing the rest of the characters is set. Example: range("A1").input("'TRUE") — sets the text "TRUE", not the boolean.

Parameters

value String|Number|Date optional

The value to be set to the cells.

Returns

Object the current value 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("1");
        sheet.range("A2").input("=A1*2");
    </script>

In this article