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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Problem with formatting cells ..part 2

Thread ID:

Created:

Updated:

Platform:

Replies:

12804 Apr 13,2004 10:45 AM UTC May 13,2004 07:35 PM UTC Windows Forms 6
loading
Tags: XlsIO
Arun Balakrishnan
Asked On April 13, 2004 10:45 AM UTC

Hi In addition to the problems that I posted beefore, I am running into a bunch of other problems as well. I would really appreciate it if you could help me out with these as well I am using the Excel RW in Syncfusion 2.0.3.0 to populate an Excel sheet using indexes to iterate through rows and columns e.g. Sheet.range(irow,icol).font.bold=true I have a section of code that behaves wierdly ----- irow=1 icol=1 sheet.range(irow,icol).font.size=10 -- In the command window I can see sheet.range(1,1).font.size=10 However when I do irow=irow+1 sheet.range(irow,icol).font.size=9 -- In the command window I can see sheet.range(2,1).font.size=9 BUT I can also see sheet.range(1,1).font.size=9 This is happening in a bunch of places i.e. formatting gets overridden or not applied at all. On turning "All Errors" on in the debug window, I get a bunch of "mscorlib.dll Input String is not in a correct format" in several places where I try to apply formats. If I say "Continue" Then it gives the same error a bunch of times and then goes to the next statement BUT the format is not applied. I am at my wits end here. Can you please try to help me out by suggesting what I may be doing wrong ? Thanks in advance for all your help Regards Arun

Arun Balakrishnan
Replied On April 13, 2004 11:53 AM UTC

A final addition to my above message ==================================== As mentioned when I keep errors on, I get a bunch of "mscorlib.dll Input string is not in a correct format error". I have noticed that they occur specifically for two or three types of statements that I am reproducing below sheet.Range(iRow, 2, iRow, iCol).CellStyle.Border(ExcelBordersIndex.EdgeBottom).LineStyle = ExcelLineStyle.Thin sheet.Range(iRow, 2, iRow,iCol).CellStyle.HorizontalAlignment = ExcelHAlign.HAlignRight sheet.Range(iRow, 1, iRow,iCol).CellStyle.Font.Size = 8 I hope that I have provided enough details in all my postings to help you diagonise my problesm. Once again thanks in advance for all your help Regards Arun

Administrator [Syncfusion]
Replied On April 13, 2004 12:10 PM UTC

Hi Arun, Thanks for the details. I am looking into this issue. I will update you as soon as possible. Thank you for your patience. Best regards, Stephen. >A final addition to my above message >==================================== >As mentioned when I keep errors on, I get a bunch of "mscorlib.dll Input string is not in a correct format error". > >I have noticed that they occur specifically for two or three types of statements that I am reproducing below > >sheet.Range(iRow, 2, iRow, iCol).CellStyle.Border(ExcelBordersIndex.EdgeBottom).LineStyle = ExcelLineStyle.Thin > >sheet.Range(iRow, 2, iRow,iCol).CellStyle.HorizontalAlignment = ExcelHAlign.HAlignRight > >sheet.Range(iRow, 1, iRow,iCol).CellStyle.Font.Size = 8 > >I hope that I have provided enough details in all my postings to help you diagonise my problesm. Once again thanks in advance for all your help > >Regards >Arun >

Administrator [Syncfusion]
Replied On April 13, 2004 01:54 PM UTC

Hi Arun, I tried to reproduce the problems that you have mentioned. I was able to reproduce the "mscorlib.dll Input String is not in a correct format" error. I will notify the development team have it fixed before the next release. However, I have not been able to reproduce the other two problems that you have mentioned. I have attached a small sample that I used to reproduce the problem. Please run the sample and let me know if you see the problems in the attached sample. I have also attached the screenshot of my spreadsheet when i ran the sample. Please let me know if there is anything that you are doing differently than what i have done in the sample. Also, can you give an approximate number of cells that you are exporting from the grid. Thanks for your co-operation on this issue. Best regards, Stephen. SampleImage_6825.zip FormattingCells_6857.zip

Arun Balakrishnan
Replied On April 13, 2004 03:18 PM UTC

Stephen You are not going to believe this. I had the "font format automatically changing" only if I set the first row font to 10 and the second row font to 9 Once I made the first row font 11, it remained there without a problem when I changed the second row font to 9. A point I noted is that the Excel document opens up with a default font of 10. Maybe this is causing it to behave wierdly for the 10 - 9 combination. Also I am glad that you could replicate the input string format problem.Please keep me posted as to the status of that fix. Once again thanks for all your help Regards Arun >Hi Arun, > >I tried to reproduce the problems that you have mentioned. I was able to reproduce the "mscorlib.dll Input String is not in a correct format" error. I will notify the development team have it fixed before the next release. > >However, I have not been able to reproduce the other two problems that you have mentioned. I have attached a small sample that I used to reproduce the problem. Please run the sample and let me know if you see the problems in the attached sample. I have also attached the screenshot of my spreadsheet when i ran the sample. Please let me know if there is anything that you are doing differently than what i have done in the sample. Also, can you give an approximate number of cells that you are exporting from the grid. Thanks for your co-operation on this issue. > >Best regards, > >Stephen. > >SampleImage_6825.zip > >FormattingCells_6857.zip > >

Greg
Replied On May 12, 2004 03:53 PM UTC

Attached is an example of a problem I encountered while writing cells into an xls file. It appears that once I set a cell to Bold, then whatever Underline style I choose is retained or used for all cells. Apparently an object is being re-used inside ExcelRW, and I''m afraid this style of bug might be in multiple places in your code. It took a while to narrow this down from my much larger project. Thanks, Greg rwattrib_854.zip

Administrator [Syncfusion]
Replied On May 13, 2004 07:35 PM UTC

Hi Greg, Thank you for the sample. This issue will be fixed in the next release. Sorry for the inconvenience. Best regards, Stephen. >Attached is an example of a problem I encountered while writing cells into an xls file. > >It appears that once I set a cell to Bold, then whatever Underline style I choose is retained or used for all cells. > >Apparently an object is being re-used inside ExcelRW, and I''m afraid this style of bug might be in multiple places in your code. > >It took a while to narrow this down from my much larger project. > >Thanks, >Greg > >rwattrib_854.zip > >

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

;