Version

Add(String,SheetType) Method

Creates a new Sheet and adds it to the collection.
Syntax
public Sheet Add( 
   string name,
   SheetType type
)

Parameters

name
The name to give the new Sheet.
type
An enumeration indicating the type of sheet to create

Return Value

The Sheet created with the specified name.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionname is null or empty.
System.ArgumentExceptionname contains the invalid characters: ':', '\', '/', '?', '*', '[', or ']'.
System.ArgumentExceptionname exceeds 31 characters in length.
System.ArgumentExceptionname is being used as the name of another sheet (sheet names are case-insensitively compared).
Remarks

If the workbook originally had no sheets, the newly added sheet will become the selected sheet of the workbook. This can be changed after more sheets are added by setting the WindowOptions.SelectedSheet of the Workbook.

Requirements

Target Platforms: Android 4.4+, iOS 8+

Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+

See Also