GetSheets

function GetSheets(): ApiWorksheet[]

Description

Returns a sheet collection that represents all the sheets in the active workbook.

Returns

ApiWorksheet[]

Try It

Api.AddSheet("new_sheet_name");
var sheets = Api.GetSheets();
var sheet_name1 = sheets[0].GetName();
var sheet_name2 = sheets[1].GetName();
sheets[1].GetRange("A1").SetValue(sheet_name1);
sheets[1].GetRange("A2").SetValue(sheet_name2);

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