'Declaration
Public Class Style Inherits Xceed.Workbooks.NET.StyleBase(Of IReadonlyStyle) Implements IReadonlyStyle
'Usage
Dim instance As Style
public class Style : Xceed.Workbooks.NET.StyleBase<IReadonlyStyle>, IReadonlyStyle
'Declaration
Public Class Style Inherits Xceed.Workbooks.NET.StyleBase(Of IReadonlyStyle) Implements IReadonlyStyle
'Usage
Dim instance As Style
public class Style : Xceed.Workbooks.NET.StyleBase<IReadonlyStyle>, IReadonlyStyle
using( var doc = Workbook.Load( "test.xlsx") ) { var worksheet = doc.Worksheets[ 0 ]; worksheet.Cells[ 1, 1 ].Value = 25.6; // Sets “B2” Value. worksheet.Cells[ 1, 1 ].Style.CustomFormat = "$0.0000"; // Sets “B2” display format to show “$25.6000”. worksheet.Cells[ 2, 2 ].Value = new DateTime( 2021, 7, 1, 10, 22, 33 ); // Sets “C3” Value. worksheet.Cells[ 2, 2 ].Style.CustomFormat = "h:mm AM/PM"; // Sets “C3” display format to show “10:22 AM”. worksheet.Cells[ “D4” ].Value = 33.5; worksheet.Cells[ “D4” ].Style.PredefinedNumberFormatId = 2; // Sets “D4” display format to “0.00” to show “33.50”. doc.Save(); }
System.Object
Xceed.Workbooks.NET.StyleBase<T>
Xceed.Workbooks.NET.Style
Name | Description | |
---|---|---|
![]() | Style Constructor |
Name | Description | |
---|---|---|
![]() | Alignment | Gets or sets the Horizontal & Vertical Alignment used to align the content of a Cell. |
![]() | Borders | Gets the collection of active Borders in a Style. |
![]() | BuiltinType | Gets or sets the BuiltinStyleType. |
![]() | CustomFormat | Gets or sets the format used to display the content of a Cell, the Cells in a Column or the Cells in a Row. |
![]() | Fill | Gets or sets the Fill used to fill the background of a Cell, Column, Row or range. |
![]() | Font | Gets or sets the Font that will be used by the Style. |
![]() | PredefinedNumberFormatId | Gets or sets the predefined number format that will be used to format the content of a Cell, the Cells in a Column or the Cells in a Row. |
![]() | Protection | Gets or sets the Protection associated with the Style. |
Name | Description | |
---|---|---|
![]() | Equals | Determines whether the specified System.Object is equal to the current System.Object. |
![]() | GetHashCode | Serves as a hash function for a particular type. |
![]() | RevertToDefault | Resets the Style of the Cell, Row or Column back to its default setting. |
Name | Description | |
---|---|---|
![]() | OnPropertyChanged | (Inherited from Xceed.Workbooks.NET.StyleBase<IReadonlyStyle>) |
Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2