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

Formula : Unexpected token.Unexpected token type

Hello,

Let's assume that variable "sheet" is a WorkSheet.
I'm trying to get the result of a single formula and I'm facing this bug :

[C#]
sheet.Range["A1", false].Value = "1";
sheet.Range["A2", false].Value = "2";
sheet.Range["A3", false].Formula = "=SUM(A1,A2)";

-> Unexpected token.Unexpected token type: tNumber, string value: , at position 7. Formula: SUM(A1,A3), Position: 8.

Where am I wrong ?
I also encouter this bug while using operator (MIN, ...).

I'm using XLSIO (Web) V.7.302.0.20.

Best regards.
Cho

5 Replies

GM Geetha M Syncfusion Team August 7, 2009 03:21 AM UTC

Hi Cho,

Thank you for your interest in Syncfusion products.

If you are working in a different regional setting other than English (en-US), then you may need to set separators based on your format as below:

workbook.SetSeparators(',', ',');

Please try this and let me know if you have any questions.

Regards,
Geetha


CH Cyril Hochet August 7, 2009 07:26 AM UTC

Sorry, my example was ambiguous.

[C#]
sheet.Range["AA1", false].Value = "1";
sheet.Range["AA2", false].Value = "2";
sheet.Range["AA3", false].Value = "3";
sheet.Range["AA4", false].Formula = "=MIN(AA1,AA3)";

What I want to do is to get the minimum of both cells AA1 and AA3 not of all the range from AA1 to AA3.(this formula : MIN(AA1:AA3) works fine).

Do I miss something ?

Thanks


VN Vijesh Narayanan Syncfusion Team August 7, 2009 01:04 PM UTC

Hi Cho,

I was unable to reproduce the issue mentioned by you. I have attached the link for the sample application I developed. Try executing this sample and if the issue is reproduced on your side then please modify the sample with required details that reproduces the issue and send it back to me.

http://files.syncfusion.com/samples/XlsIO.Windows/F88689/Forum%2088689.zip

Thank you for you patience.

Regards,
Vijesh


CH Cyril Hochet August 7, 2009 01:15 PM UTC

Sorry, same result with this code.
For your information, I'm using XLSIO for .Net Framework 2.0 (Web).




VN Vijesh Narayanan Syncfusion Team August 18, 2009 05:49 AM UTC

Hi Cho,

I tried creating a web application with Framework 2.0 but still I am getting the desired result, the possibility to this could be that I have wrongly interpreted your requirement. So, If possible could you please provide more details on your requirements or preferably if you could send a sample application in which you are coming across this issue, which will allow me to look into this issue more closely.


Thank you for your patience.

Regards,
Vijesh

Loader.
Live Chat Icon For mobile
Up arrow icon