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.

Why is the return value from CalculatedValue include the char \" ??

Thread ID:

Created:

Updated:

Platform:

Replies:

110934 Sep 1,2013 11:21 PM Sep 2,2013 07:56 AM Windows Forms 2
loading
Tags: XlsIO
Chen
Asked On September 1, 2013 11:21 PM

Cell A9  Formula  =IF(C9=1,"MyTest","") 

If C9 = 1 in my C# project, A9 = \"MyTest\".     including \" \", but in Microsoft Excel, no \"\"

If C9 != 1 in my C# project, A9 = \"\".     including \" \", but in Microsoft Excel, no \"\"

The big problem is below:

Cell A2 Formula =IF(C2=1,"2","") 

Cell A3 Formula =IF(C3=1,"3","") 

Cell A4 Formula =IF(C4=1,"4","") 

Cell A1 Formula =SUM(A2:A4)

A1 will got an error message when A2=\"\" or A3=\"\" or A4=\"\".

How to exclude the char " from the CalculatedValue of XlsIO ExcelEngine?

 

Thanks~


Sridhar [Syncfusion]
Replied On September 2, 2013 02:30 AM

Hi Chen,

Thank you for using Syncfusion products.

Please make use of the "UseNoAmpersandQuotes" of CalcEngine property to remove the (") character while calculating formulas with Essential XlsIO.

Code Snippet [C#]:

IWorksheet sheet = workBook.Worksheets[0];
sheet.CalcEngine.UseNoAmpersandQuotes = true;

Please try the above code snippet at your side and let me know if this helps you. If you still face the issue, please get back to us with the simplified issue reproducing sample to proceed further on this.

Thanks,
Sridhar.S


Sridhar [Syncfusion]
Replied On September 2, 2013 07:56 AM

Hi Chen,

Please ignore the previous post.

Please make use of the below code snippet for calculating the formulas at run time, to remove the (") character with Essential XlsIO and let us know if this helps you.

 

Code Snippet [C#]:

IWorksheet sheet = workBook.Worksheets[0];
sheet.EnableSheetCalculations();
sheet.CalcEngine.UseNoAmpersandQuotes = true;

 

If you still face the issue, please get back to us with the simplified issue reproducing sample to proceed further on this.


Thanks,
Sridhar.S


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.

;