Message-ID: <2093712499.9353.1711689317452.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_9352_1489704175.1711689317452" ------=_Part_9352_1489704175.1711689317452 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
ExcelWriter creates three style types: GlobalStyle, NamedStyle, =
and CellStyle. All three style type=
s derive from the Style class, and GlobalStyle
.
<p> public class GlobalStyle : Style</p>=20
<p>Public Class GlobalStyle<br /> =09=09Inherits Style</p>=20
A style can be set or= applied to cells, rows,= columns, ranges, and areas. When a style is set, it is cloned and the object to which the style is= assigned acquires all of that style's properties, including font propertie= s and number formatting. When a style is applied, only the differences between the new style and ex= isting style properties (assigned through the ExcelWriter API or in Microso= ft Excel) will take effect. For example, if the cell has a background color= and the new style applied does not contain a background color, the cell's = color will not be affected. However, if the new style includes a background= color, it will replace the existing background color of the cell.
=20To set a style, use t=
he Style
property. To apply a style, call ApplyStyle
. Both are accessible=
through the following objects: Cell, Area, Range, RowProperties, and ColumnProperties.
Style styleMoneyFormat =3D wb.CreateStyle(); styleMoneyFormat.NumberFormat =3D "$#,##0"; Style styleTitle =3D wb.CreateStyle(); styleTitle.Font.Size =3D 14; styleTitle.Font.Color =3D wb.Palette.GetClosestColor(100, 100, 25= 5);=20
Dim styleMoneyFormat As Style =3D wb.CreateStyle() styleMoneyFormat.NumberFormat =3D "$#,##0" Dim styleTitle As Style =3D wb.CreateStyle() styleTitle.Font.Size =3D 14 styleTitle.Font.Color =3D wb.Palette.GetClosestColor(100, 100, 25= 5)=20