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.

ParseException

Thread ID:

Created:

Updated:

Platform:

Replies:

91160 Nov 6,2009 10:20 AM Nov 9,2009 01:45 AM ASP.NET Web Forms (Classic) 2
loading
Tags: XlsIO
Artur
Asked On November 6, 2009 10:20 AM

Hi,
I try set Formula.

Listing:

using (ExcelEngine excelEngine = new ExcelEngine())
{
IWorkbook book = null;
IWorksheet sheet = null;
book = excelEngine.Excel.Workbooks.Add();
sheet = book.ActiveSheet;
IRange range;
range = sheet.Range["A1"];
range.Number = 9.0;
range = sheet.Range["A2"];
range.Number = 12.0;
range = sheet.Range["A3"];
range.Number = 12.0;
range = sheet.Range["A4"];
this --> range.Formula = "SUBTOTAL(9;B1:B3)";
}

And get:

Unexpected token.Unexpected token type: Identifier, string value: at position 11. Formula: SUBTOTAL(9;B1:B3), Position: 11


What wrong ?

Artur
Replied On November 7, 2009 02:58 AM

Hmm.. i Write that:

using (ExcelEngine excelEngine = new ExcelEngine())
{
IWorkbook book = null;
IWorksheet sheet = null;
book = excelEngine.Excel.Workbooks.Add();
sheet = book.ActiveSheet;
IRange range;
range = sheet.Range["A1"];
range.Number = 9.0;
range = sheet.Range["A2"];
range.Number = 12.0;
range = sheet.Range["A3"];
range.Number = 12.0;
range = sheet.Range["A4"];
---> range.Formula = "SUBTOTAL(9,B1:B3)";
}



Unexpected token.Unexpected token type: Identifier, string value: B1:B3 at position 12. Formula: SUBTOTAL(9,B1:B3), Position: 17


Geetha M [Syncfusion]
Replied On November 9, 2009 01:45 AM

Hi Artur,

This exception occurs if different regional setting is used other than English. You may need to set separator to workbook before assigning formula depending upon your current UI culture. Please refer to the following KB article which explains the same:

http://www.syncfusion.com/support/kb/1952/

Regards,
Geetha

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.

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.

;