跳到主要内容

SHEET

Returns the sheet number of the reference sheet.

Syntax

expression.SHEET(arg1);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1Optionalstring | ApiRange | ApiNameThe name of a sheet or a reference for which the sheet number will be returned. If omitted the number of the sheet containing the function is returned.

Returns

number

Example

const worksheet = Api.GetActiveSheet(); 
let func = Api.GetWorksheetFunction();
let result = func.SHEET("Sheet1");
worksheet.GetRange("C3").SetValue(result);