SHEETS
function SHEETS(arg1: ApiRange = null): number | string | boolean
Description
Returns the number of sheets in a reference.
Parameters
Is a reference for which you want to know the number of sheets it contains. If omitted the number of sheets in the workbook containing the function is returned.
Returns
number | string | boolean
Try It
// Add more sheets
Api.AddSheet("Sheet2")
Api.AddSheet("Sheet3")
// Get the number of sheets
var oFunction = Api.GetWorksheetFunction();
var result = oFunction.SHEETS();
const oWorksheet = Api.GetActiveSheet();
oWorksheet.GetRange("C3").SetValue(result);