SpreadJS 14
Features / Formulas / Allow Users to Enter Formulas
In This Topic
    Allow Users to Enter Formulas
    In This Topic

    Users can enter a formula in a cell by starting with an equals sign (=). Type the equal sign and then the formula such as = sum(A1+B1). You can allow or prevent the user from entering formulas with the options.allowUserEditFormula property.

    Using Code

    This example allows users to enter formulas.

    Copy Code
    window.onload = function()
      var spread =
      new GC.Spread.Sheets.Workbook(document.getElementById("ss"),{sheetCount:3});
      var sheet = spread.getActiveSheet();
      // Allow users to enter mathematical formula.
      spread.options.allowUserEditFormula = true;
      activeSheet.setValue(0, 0, 1000);
      activeSheet.setValue(1, 0, 200);