WorkbookDefaultStyle Property

Gets or sets the default Style object of the workbook.

Namespace:  Aspose.Cells
Assembly:  Aspose.Cells (in Aspose.Cells.dll) Version: (22.5.0)
public Style DefaultStyle { get; set; }

Property Value

Type: Style
The DefaultStyle property is useful to implement a Style for the whole Workbook.
The following code creates and instantiates a new Workbook and sets a default Style to it.
Workbook workbook = new Workbook();
Style defaultStyle = workbook.DefaultStyle;
defaultStyle.Font.Name = "Tahoma";
workbook.DefaultStyle = defaultStyle;

[Visual Basic]
Dim workbook as Workbook = new Workbook()
Dim defaultStyle as Style = workbook.DefaultStyle
defaultStyle.Font.Name = "Tahoma"
workbook.DefaultStyle = defaultStyle
See Also