Example: FormulaHidden property

This example hides the cell's formula when the current sheet is not modifiable.

  spreadsheet.getActiveSheet().cells(1,1).setValue(10);   
  spreadsheet.getActiveSheet().cells(1,2).setValue(20);  
  spreadsheet.getActiveSheet().cells(1,3).setFormula("=A1+B1");
  spreadsheet.getActiveSheet().cells(1,3).setFormulaHidden (true);  
  spreadsheet.getActiveSheet().protect("1234");

Related information

FormulaHidden property