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. Image for the cookie policy date
close icon

Formula problems

Hi! I have a problems with Range.Formuala formatting. Here is code that demonstrate the problem: double k = 17.90; IRange rng = mySheet[1, 1]; rng.Formula = k.ToString(); But then I open a document, there is no correct formaula value at "A1" cell. In this cell - error. The value of this cell is: "=17;90" not "=17,90" Why so? Can you help me. Thanks a lot!

8 Replies

AD Administrator Syncfusion Team August 23, 2005 01:09 PM UTC

Also next code fragment does not correctly work: Sheet["A1"].Formula = "15,06"; When I open document there is error expression in cell "A1" - the value of cell is "=15;6" instead "=15,06". Can I pass this problem or this is a bug? Thanks a lot!


AD Administrator Syncfusion Team August 25, 2005 10:35 AM UTC

Hi Eminem, This is what I am seeing 1) The value in cell A1 is =17.9 2) This shows up as an error but this seems to happen even when you directly open MS Excel and type in "=15,06" as a formula in cell A1. Here is the output from my testing Sample.zip Could you please provide more infomation on your requirements. Thanks, Stephen. >Also next code fragment does not correctly work: > >Sheet["A1"].Formula = "15,06"; > >When I open document there is error expression in cell "A1" - the value of cell is "=15;6" instead "=15,06". Can I pass this problem or this is a bug? Thanks a lot! >


AD Administrator Syncfusion Team August 25, 2005 12:24 PM UTC

>Hi Eminem, > >This is what I am seeing > >1) The value in cell A1 is =17.9 > >2) This shows up as an error but this seems to happen even when you directly open MS Excel and type in "=15,06" as a formula in cell A1. > >Here is the output from my testing >Sample.zip > >Could you please provide more infomation on your requirements. > >Thanks, > >Stephen. But in my case manual input of formula correctly parsing by Excel Application. If I past the same formula by code - Excel does not correctly recognize it. Attachment file show the problem (run project in debug mode) ExcelRWProblems_5040.zip


AD Administrator Syncfusion Team August 25, 2005 12:27 PM UTC

>>Hi Eminem, >> >>This is what I am seeing >> >>1) The value in cell A1 is =17.9 >> >>2) This shows up as an error but this seems to happen even when you directly open MS Excel and type in "=15,06" as a formula in cell A1. >> >>Here is the output from my testing >>Sample.zip >> >>Could you please provide more infomation on your requirements. >> >>Thanks, >> >>Stephen. >But in my case manual input of formula correctly parsing by Excel Application. If I past the same formula by code - Excel does not correctly recognize it. > >Attachment file show the problem (run project in debug mode) > >ExcelRWProblems_5040.zip > In addition - formula correctly parsing if numbers in formula have integer type. If type of numbers is double - appear problems


AD Administrator Syncfusion Team September 1, 2005 11:40 AM UTC

Hi Eminem, Sorry for the delay in getting back to you. The problem seems to be with the decimal separation character (.) in english settings and (,) in some european settings( which I assume you are using). The following code works correctly on my machine rng.Formula = "15.9+102.45+78"; Could you please let me know the localized version of MS Excel that you are using? Thanks, Stephen. > > >>>Hi Eminem, >>> >>>This is what I am seeing >>> >>>1) The value in cell A1 is =17.9 >>> >>>2) This shows up as an error but this seems to happen even when you directly open MS Excel and type in "=15,06" as a formula in cell A1. >>> >>>Here is the output from my testing >>>Sample.zip >>> >>>Could you please provide more infomation on your requirements. >>> >>>Thanks, >>> >>>Stephen. >>But in my case manual input of formula correctly parsing by Excel Application. If I past the same formula by code - Excel does not correctly recognize it. >> >>Attachment file show the problem (run project in debug mode) >> >>ExcelRWProblems_5040.zip >> >In addition - formula correctly parsing if numbers in formula have integer type. If type of numbers is double - appear problems


AD Administrator Syncfusion Team September 2, 2005 11:24 AM UTC

>The problem seems to be with the decimal separation character (.) in english settings and (,) in some european settings( which I assume you are using). > In settings of my OS and Excel Applicationa decimal separator is '','' character >The following code works correctly on my machine > >rng.Formula = "15.9+102.45+78"; > This code does not correctly work in my application. It throws the exception - An unhandled exception of type ''System.ArgumentException'' occurred in syncfusion.excelrw.base.dll Additional information: Can''t parse formula: 15.9 Code rng.Formula = "15,9+102,45+78" work perfectly without any exception, but in Excel this formula marked as error and looks as "=15;9+102;45+78" >Could you please let me know the localized version of MS Excel that you are using? > >Thanks, > I tried work with two versions of Excel - English and Russian, but both versions does not correctly parse this formula. The ugly decision of this problem i found with next code: rng.Formula = "VALUE(\"15,9\")+VALUE(\"102,45\")+78"


AD Administrator Syncfusion Team September 14, 2005 02:24 PM UTC

Can I expect to your help in this problem?


AD Administrator Syncfusion Team September 19, 2005 11:29 AM UTC

Hi Eminem, Sorry for the delay in getting back to you. This issue has been identified as a bug in XlsIO so I have created a bug report with the development team regarding this. You can track the status of this issue here http://www.syncfusion.com/support/issues/xlsio/Default.aspx?ToDo=view&questId=772 Thanks, Stephen. >Can I expect to your help in this problem?

Loader.
Live Chat Icon For mobile
Up arrow icon