Creates a new worksheet at a specified position in the workbook.

 public Worksheet CreateWorksheet(System.String name, int position)
Public Function CreateWorksheet(ByVal name As String, ByVal position As Integer) As Worksheet

Name for the new worksheet.

The 0-based position at which to insert the worksheet. If position is greater than Worksheets.Count, an exception will be thrown.

A Worksheet object representing the worksheet created.

Worksheet ws = sheets.CreateWorksheet("NewSheet", 0);
Dim ws As Worksheet = sheets.CreateWorksheet("NewSheet", 0)