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

Problems with formulas

Hi,

I was working with an Office 2007 Excel file through XlsIO and one of the formulas in the sheet was giving me problems and the strange thing is, it's a very basic formula (I'll simplify it on the example but that variation was giving me the same result):

=IF(B1<B2; B3; B4)

As you can see, it's a very simpel formula but when debugging the source code I get "requires 3 arguments" on the CalculatedValue property of the cell and none of its other properties was returning the desired result. Before that evaluation I execute the sheet sub EnableSheetCalculations so it's not a problem of no evalauted formulas.

As a workaround I made a VBA function inside the Excel file:

Function MyFunctionIF(ByVal blnCondition As Boolean, ByVal strTrue As String, ByVal strFalse As String) As String
    Dim strResult As String
   
    If blnCondition = True Then
        strResult = strTrue
    Else
        strResult = strFalse
    End If
    MyFunctionIF= strResult

End Function


I then replaced =IF(B1<B2; B3; B4) with =MyFunctionIF(B1<B2; B3; B4) on the desired Excel cells and got the desired results. Anyway, this is kind of a curious bug I was confronted with. For more details, I'm using a Spanish Edition of MS Office Excel and the installed Syncfusion version is 10.3.0.43.

7 Replies

RA Rajesh A Syncfusion Team May 29, 2013 10:15 AM UTC

Hi Boris Mouzo Izquierdo,

 

  Thank you for using the Syncfusion products.

 

We are able to reproduce the issue "requires 3 arguments" in version 10.3.0.43. But, we have fixed this issue in our latest version 11.2.0.25v. We have attached the screen shot for this. We strongly recommend you to upgrade your version to the latest one which has more enhancements and improved in performance.

 

Video Screen Shot:  Formula.zip

 

You can download the latest version from the following link.

http://www.syncfusion.com/downloads/latest-version

Kindly let us know if you need any clarification.

Regards,

Rajesh A

 



BM Boris Mouzo Izquierdo May 29, 2013 11:07 AM UTC

Hi Rajesh,

Thanks for your answer. I just saw the video you posted where we can clearly see that there's a bug with Excel formulas at least up to version 10.3.0.43 and that with the latest one this bug no longer appears. Now, about downloading the latest version of the suite, if it were for me I would go for it as I've been working with the Syncfusion controls for a time and am quite happy with them. The only problem is that our subscription has already expired and because of budget cuts in our company a renewal is not possible, so I guess we'll have to use the workaround I mentioned before.

Best regards... Boris


RA Rajesh A Syncfusion Team May 31, 2013 04:35 AM UTC

Hi Boris Mouzo Izquierdo,

  Thank you for your update.

 Please let us know if you have any clarification.

Thanks,

Rajesh.A



BM Boris Mouzo Izquierdo June 6, 2013 01:52 PM UTC

Hi Rajesh,

In the end, what we thought would be a functioning workaround didn't work at all. In the VBA Function the If statement always evaluated to False. Since there were no more options left and time is running short, the only way to solve it was to renew the Syncfusion license.

Thansk again


RA Rajesh A Syncfusion Team June 10, 2013 05:10 AM UTC

Hi Boris Mouzo Izquierdo,

 

  Thank you for your update.

 

Yes, you need to upgrade your version to resolve the above reported issue.

 

Please let us know if you have any clarification.

 

Thanks,

Rajesh.A



BM Boris Mouzo Izquierdo June 19, 2013 12:08 PM UTC

Hi Rajesh,

We've found another issue regarding formulas. I also provide the source code (found on another topic) and the Excel file. As you can see there are some formulas in the Excel file. In the source code we added the line 138 where we write into one of the cells (B10) a specific value to change the one in the original file. Now to the bug we found: Debugging the application and watching the contents of the cell F11 it returns "#N/A" while cell G11 evaluates the cell and formula correctly. As you can see, both formulas are exactly the same except one uses the B10 and the other one B11 as the first parameter. Can you please check what might be going on and give us an answer ASAP?

Thanks in advance


NamedFormula_5aef99fc.zip


RA Rajesh A Syncfusion Team June 21, 2013 04:57 AM UTC

Hi Boris Mouzo Izquierdo ,

 

              Thank you for your update. 

We are able to reproduce the issue from your sample. We are requesting you to create a new direct-trac incident and Request for issue in that. This helps us to proceed further. 

Direct-Trac Link: Login

 

Please let us know if you require any further clarifications.

 

Thanks,

Rajesh.A

 

 


Loader.
Live Chat Icon For mobile
Up arrow icon