Version

Add(String) Method

Creates a new Worksheet and adds it to the collection.
Syntax
public Worksheet Add( 
   string name
)

Parameters

name
The name to give the new Worksheet.

Return Value

The Worksheet 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 worksheet (worksheet names are case-insensitively compared).
Remarks

If the workbook originally had no worksheets, the newly added worksheet will become the selected worksheet of the workbook. This can be changed after more worksheets are added by setting the WindowOptions.SelectedWorksheet 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