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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Standard Font info

Thread ID:

Created:

Updated:

Platform:

Replies:

13271 Apr 24,2004 12:37 AM UTC May 18,2004 05:47 PM UTC WinForms 4
loading
Tags: XlsIO
Greg
Asked On April 24, 2004 12:37 AM UTC

ExcelRW supports a standard column width and row height for undefined cells, but I cannot find the standard font information used for all undefined cells. Thanks, Greg

Administrator [Syncfusion]
Replied On April 24, 2004 05:40 AM UTC

Hi Greg, Here is the code snippet for getting the Standard font. But there seems to be a bug because its returning "Tahoma" all the time. I will isvestigate more into this issue and get it fixed. ExcelEngine excelEngine = new ExcelEngine(); IApplication application = excelEngine.Excel; IWorkbook myWorkbook = excelEngine.Excel.Workbooks.Open("Template.xls"); IWorksheet mySheet = myWorkbook.Worksheets[0]; string fontName = mySheet.Application.StandardFont; MessageBox.Show(fontName.ToString()); myWorkbook.Close(); excelEngine.ThrowNotSavedOnDestroy = false; excelEngine.Dispose(); Sorry for the inconvenience. Please let me know if you have any other questions. Thanks. Best regards, Stephen. >ExcelRW supports a standard column width and row height for undefined cells, but I cannot find the standard font information used for all undefined cells. > >Thanks, >Greg >

Greg
Replied On April 24, 2004 01:02 PM UTC

Aha! Hiding it under the .Application, while the height and width is available directly under the Worksheet. ;-) I hadn''t looked under Application before, but I will now. It seems to me that this is not an Application property but a Workbook property, as each file will remember its own standard. Thanks, Greg

Administrator [Syncfusion]
Replied On May 18, 2004 04:07 PM UTC

Hi Greg, I looked it into this issue and it seems that the standard font is an application level setting. Here is a simple test. 1) Go to Tools >> Option >> General Tab and then set the standard font to TimesNewRoman 2) Close the excel spreadsheet. Then create a new spreadsheet. 3) Again change the standard font settings to Arial thro Tools >> Options and close the workbook. 4) Now try opening the spreadsheet that you had originally created using TimesNewRoman as the standard font, and go to Tools >> Options, it will display the standard font as Arial. Please let me know if i am missing something. Thanks. Best regards, Stephen. >Aha! Hiding it under the .Application, while the height and width is available directly under the Worksheet. ;-) I hadn''t looked under Application before, but I will now. > >It seems to me that this is not an Application property but a Workbook property, as each file will remember its own standard. > >Thanks, >Greg >

Greg
Replied On May 18, 2004 05:47 PM UTC

Stephen, You are correct; this is an application level variable in Excel. Still odd, I say. Glad you''re looking into these issues again, as this indicates you may be testing out the attempted fixes. I recommend that you create an automated regression testing system in which you have an increasing number of excel files that your scripts read, write back, and compare. If you can create scripts that encompass all of the properties and methods of the ExcelRW, then you''ll have a good attempt at good coverage, and a test bank to compare to ensure that future changes do not disrupt what already works. Good Luck, Greg

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

;