Syncfusion.XlsIO.Base
Example 


IncludeFont Property

True if the style includes the Background, Bold, Color, ColorIndex, FontStyle, Italic, Name, OutlineFont, Shadow, Size, Strikethrough, Subscript, Superscript, and Underline font properties. Read / write Boolean.
Syntax
'Declaration
 
Property IncludeFont As Boolean
'Usage
 
Dim instance As IExtendedFormat
Dim value As Boolean
 
instance.IncludeFont = value
 
value = instance.IncludeFont
bool IncludeFont {get; set;}
Example
The following code illustrates how to exclude IFont related settings for a specific IStyle object.
using Syncfusion.XlsIO;
            
class Program
{
    static void Main()
    {
        using (ExcelEngine excelEngine = new ExcelEngine())
        {
            //Create worksheet
            IApplication application = excelEngine.Excel;
            application.DefaultVersion = ExcelVersion.Excel2013;
            IWorkbook workbook = application.Workbooks.Create(1);
            IWorksheet worksheet = workbook.Worksheets[0];
            
            //Set text
            worksheet["C2"].Text = "Sample";
            worksheet["E2"].Text = "Sample";
            
            //Add style
            IStyle style = workbook.Styles.Add("CustomStyle");
            
            //Set font
            IFont font = style.Font;
            
            //Set bold
            font.Bold = true;
            
            //Set include font
            style.IncludeFont = false;
            
            //Set style
            worksheet["C2"].CellStyle = style;
            
            //Get extended format
            IExtendedFormat format = worksheet["E2"].CellStyle;
            
            //Set font
            IFont formatFont = format.Font;
            
            //Set bold
            formatFont.Bold = true;
            
            //Set include font
            format.IncludeFont = false;
            
            //Save and dispose
            workbook.SaveAs("CellFormats.xlsx");
            workbook.Close();
        }
    }
}
AssemblyVersion

Syncfusion.XlsIO.Base: 17.2460.0.34

See Also