Method MoveTo
- Namespace
- DocWright.Spreadsheet
- Assembly
- DocWright.Spreadsheet.dll
MoveTo(int)
Moves the sheet to another place among the workbook's tabs.
public void MoveTo(int index)
Parameters
Remarks
References by name do not care where a sheet stands. One kind does: a reference through
several sheets (Jan:Mar!B4). Measured against Excel: when the sheet moved is one
end of such a reference and now stands on the other side of the other end, that end
becomes the sheet that stood next to it inside the span (Jan:Mar becomes
Jan:Feb when Mar moves before Jan); otherwise the text is left, and the span
covers whatever now stands between its ends. The sheet the workbook opens on stays the
same sheet.
Exceptions
- ArgumentOutOfRangeException
indexis not a place in the list.- InvalidOperationException
The sheet was deleted.
- InvalidDocumentException
A part of the workbook is malformed.