Message-ID: <1707929057.9345.1711688959333.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_9344_1062407745.1711688959333" ------=_Part_9344_1062407745.1711688959333 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Workbook.CreateNamedStyle(String)

Workbook.CreateNamedStyle(String)

Descriptio= n

=20

Creates a named global style, which can be bound to cells, areas, ranges= , rows, and columns. Any later changes to this style will affect all cells = to which the style was assigned.

=20
C#
=20
 public NamedStyle CreateNamedStyle(System.String styleName)
=20
=20
vb.net
=20
Public Function CreateNamedStyle(ByVal styleName As String) As NamedStyle
=20
=20

Parameters

=20
styleName
The n= ame of the new style.=20

Returns

A=20 NamedStyle object= which can be assigned to cells, and can be accessed and modified from the = generated Excel spreadsheet.=20

Remarks

=20

To bind a style to a cell or set of cells, use either Style= or ApplyStyle. Both are accessible through the following obje= cts: Cell, Area, Range, RowProperties, and ColumnProperties.

=20

Style definitions created by CreateNamedStyle are saved in the generated = spreadsheet, and can be accessed and modified when the file is opened in Mi= crosoft Excel. If a style with the same name already exists an exception wi= ll be thrown.

=20

Examples

=20
C#
=20
NamedStyle heading1Style =3D wb.CreateNamedStyle("Heading1");=20
=20
vb.net
=20
Dim heading1Style As NamedStyle =3D wb.CreateNamedStyle("Heading1"=
;)
=20
------=_Part_9344_1062407745.1711688959333--