The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Setting the StandardFontSize property of a workbook appears to multiply the set value by 20, as the following code illustrates.
=======================================
ExcelEngine eng = new ExcelEngine();
IApplication app = eng.Excel;
IWorkbook xl = app.Workbooks.Create(1);
IWorksheet sht = xl.Worksheets[0];
string standardFont = "Tahoma";
double standardFontSize = 8;
xl.StandardFont = standardFont;
xl.StandardFontSize = standardFontSize;
sht[1,1].Text = "The StandardFontSize is: " + xl.StandardFontSize.ToString();
xl.SaveAs(@"C:\test.xls");
=======================================
Am I doing something wrong?
I am using v2.1.0.9
Thanks-
James
ADAdministrator Syncfusion Team October 6, 2004 04:38 PM UTC
Hi James,
This has been identified as a bug and will be
fixed at the earliest.
You can edit the normal style to get the desired effect
xl.Styles["Normal"].Font.Size = 8;
xl.Styles["Normal"].Font.FontName = "Tahoma";
Please let me know if you have any questions. Sorry for the inconvenience. Thanks.
Best regards,
Stephen.
>Setting the StandardFontSize property of a workbook appears to multiply the set value by 20, as the following code illustrates.
>
>=======================================
>ExcelEngine eng = new ExcelEngine();
>IApplication app = eng.Excel;
>
>IWorkbook xl = app.Workbooks.Create(1);
>IWorksheet sht = xl.Worksheets[0];
>
>string standardFont = "Tahoma";
>double standardFontSize = 8;
>
>xl.StandardFont = standardFont;
>xl.StandardFontSize = standardFontSize;
>
>sht[1,1].Text = "The StandardFontSize is: " + xl.StandardFontSize.ToString();
>
>xl.SaveAs(@"C:\test.xls");
>=======================================
>
>Am I doing something wrong?
>
>I am using v2.1.0.9
>
>Thanks-
>
>James