Forums     Knowledge Base     OfficeWriter Online     
 
 
This documentation is for
OfficeWriter v3.7.1
ASP/COM Platform

View Docs for Another
Version or Platform

Programmer's Reference > ExcelApplication > Methods > CreateStyle

ExcelApplication is not
available in ExcelWriterSE.

CreateStyle Method

Syntax:

[VBScript]
Function CreateStyle() As SAStyle

Description:

Use CreateStyle to create a Style object. The Style object represents a common style for a group of cells. To define a style, first create a Style object, and assign values to any of its properties.

For more information on creating formats and styles, see, Adding Formatting.

Example:

[VBScript]
'--- Create a style.
Set mystyle = xlw.CreateStyle
mystyle.Font.Name = "Arial"
mystyle.Font.Bold = True
'--- Assign the style to a cell.
ws.cells("A1").style = mystyle



Copyright 2006 © SoftArtisans, Inc. All Rights Reserved.