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.

ConditionalFormat with CellValue only allowed for numerics

Thread ID:





47278 Aug 1,2006 03:01 PM May 18,2009 02:17 AM Windows Forms 3
Tags: XlsIO
Joseph Spivey
Asked On August 1, 2006 03:01 PM

Hello, When using xlsIO v4.2.0.37 in the Windows Forms environment to esatblish conditional formatting for a text comparison, it fails as shown below. It only works if the FirstFornula contains a valid numeric value, also shown for comparison.

conditionalFormat.FormatType = ExcelCFType.CellValue;
conditionalFormat.FirstFormula = "1000"; //OK
conditionalFormat.FirstFormula = "FRED";
An unhandled exception of type ''System.ArgumentException'' occurred in syncfusion.xlsio.base.dllAdditional information: Can''t parse formula: FRED

Administrator [Syncfusion]
Replied On August 1, 2006 04:32 PM

Hi Spivey,

I am able to reproduce the problem.I have filed a bug report regarding this issue.

Please track the status of this bug through the following link:http://www.syncfusion.com/support/issues/xlsio/Default.aspx?ToDo=view&questId=2487

Please let me know if you have any other queries.


Administrator [Syncfusion]
Replied On May 14, 2009 05:30 PM

I'm using and I'm seeing this problem. Has it been fixed?

Geetha M [Syncfusion]
Replied On May 18, 2009 02:17 AM

Hi Brian,

Thank you for your interest in Syncfusion products.

This is not an issue as it expects only Formula to be passed in "FirstFormula" property. In case if a text is expected then it can be given as "\"FRED\"".

The below code works fine:

conditionalFormat.FirstFormula = "\"FRED\"";

//Setting format properties.
conditionalFormat.Operator = ExcelComparisonOperator.Equal;
conditionalFormat.FormatType = ExcelCFType.CellValue;
conditionalFormat.BackColorRGB = Color.FromArgb(238, 122, 3);

Please try using this modified code snippet and let me know if you have any questions.



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.