跳到主要内容

GetSheet

Returns an object that represents a sheet.

Syntax

expression.GetSheet(nameOrIndex);

expression - A variable that represents a Api class.

Parameters

NameRequired/OptionalData typeDefaultDescription
nameOrIndexRequiredstring | numberSheet name or sheet index.

Returns

ApiWorksheet | null

Example

This example shows how to get an object that represents a sheet.

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