We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

StandardFontSize

Thread ID:

Created:

Updated:

Platform:

Replies:

19931 Oct 6,2004 03:22 PM UTC Oct 6,2004 04:38 PM UTC WinForms 1
loading
Tags: XlsIO
James Webb
Asked On October 6, 2004 03:22 PM UTC

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

Administrator [Syncfusion]
Replied On 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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;