SetValue

function SetValue(data: string | bool | number | [][] | [][][] = null): boolean

Description

Sets a value to the current cell or cell range.

Parameters

datastring | bool | number | [][] | [][][]default: null

The general value for the cell or cell range.

Returns

boolean

Try It

var oWorksheet = Api.GetActiveSheet();
oWorksheet.GetRange("B1").SetValue("2");
oWorksheet.GetRange("B2").SetValue("2");
oWorksheet.GetRange("A3").SetValue("2x2=");
oWorksheet.GetRange("B3").SetValue("=B1*B2");

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).