Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Description

Excerpt

Moves a worksheet to a different position in the workbook.

Signature
C#
C#
 public void MoveSheet(Worksheet sheet, int position)
{signature}{signature:
}
Signature
vb.net
vb.net
Public Sub MoveSheet(ByVal sheet As Worksheet, ByVal position As Integer)
{signature}
{parameters}
{param:sheet}A [Worksheet|Worksheet] object representing the sheet to move.{param}
{param:position}The 0\-based position to which to move the specified worksheet. If {{position}} is less than 0, the sheet will be the first sheet in the workbook. If {{position}} is equal to or greater than [Worksheets.Count|Worksheets.Count], it will be inserted after the last worksheet.{param}
{example}{code:csharp|title=C#}
Parameters
Param
sheet
sheet

A Worksheet object representing the sheet to move.

Param
position
position

The 0-based position to which to move the specified worksheet. If position is less than 0, the sheet will be the first sheet in the workbook. If position is equal to or greater than Worksheets.Count, it will be inserted after the last worksheet.

Example
Code Block
csharp
csharp
titleC#

sheets.MoveSheet(oWorkSheet, 3);
{code} {code:
Code Block
vb.net
|title=
vb.net
titlevb.net
}

sheets.MoveSheet(oWorkSheet, 3)
{code} {example}