Move

function Move(before: ApiWorksheet = null, after: ApiWorksheet = null): void

Description

Moves the current sheet to another location in the workbook.

Parameters

beforeApiWorksheetdefault: null

The sheet before which the current sheet will be placed. You cannot specify "before" if you specify "after".

afterApiWorksheetdefault: null

The sheet after which the current sheet will be placed. You cannot specify "after" if you specify "before".

Returns

void

Try It

var oSheet1 = Api.GetActiveSheet();
Api.AddSheet("Sheet2");
var oSheet2 = Api.GetActiveSheet();
oSheet2.Move(oSheet1);

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