GetSheet

function GetSheet(nameOrIndex: string | number = null): ApiWorksheet | "null"

Description

Returns an object that represents a sheet.

Parameters

nameOrIndexstring | numberdefault: null

Sheet name or sheet index.

Returns

ApiWorksheet | "null"

Try It

var oWorksheet = Api.GetSheet("Sheet1");
oWorksheet.GetRange("A1").SetValue("This is a sample text on 'Sheet1'.");

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).