Description
Use the SpreadsheetGear.IFont interface to access various properties relating to font formatting, such as IFont.Name, IFont.Size, IFont.Bold, IFont.Italic, IFont.Underline, IFont.Superscript, IFont.SubscriptIFont.Color, IFont.ThemeColor and others.
This sample demonstrates setting the font of cell B2 to use Times New Roman, 14pt, bold and with the pre-defined color SpreadsheetGear.Colors.Blue.
Note that the
SpreadsheetGear.IFont interface is available for objects besides cells—it's used anywhere that fonts can be formatted. For instance, various components of a chart will have a Font property such as IChartTitle.Font or ILegend.Font. Shapes that support Text Frames (such as a TextBox) use a Font property to modify its text. Workbook Styles also have an IStyle.Font property.