'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
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