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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ConditionalFormat with CellValue only allowed for numerics

Thread ID:





47278 Aug 1,2006 07:01 PM UTC May 18,2009 06:17 AM UTC WinForms 3
Tags: XlsIO
Joseph Spivey
Asked On August 1, 2006 07:01 PM UTC

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 08:32 PM UTC

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 09:30 PM UTC

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

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

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon