Version

AddUserDefinedStyle(IWorksheetCellFormat,String) Method

Adds new user defined style to the workbook.
Syntax
public WorkbookStyle AddUserDefinedStyle( 
   IWorksheetCellFormat styleFormat,
   string name
)

Parameters

styleFormat
A cell format of the style.
name
The name which will identify the style in Microsoft Excel.

Return Value

The added user defined style as a WorkbookStyle instance.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionname is null or empty.
System.ArgumentNullExceptionname is longer than 255 characters.
System.ArgumentExceptionA style already exists with the a name of name. Names are compared case-insensitively.
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