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.

BUILD (7.4.0.20) BUG: Alphabetic Characters in Conditional Formatting Formula interpretted as Named Range

Thread ID:

Created:

Updated:

Platform:

Replies:

91419 Nov 17,2009 03:53 PM Aug 30,2012 02:38 AM Windows Forms 2
loading
Tags: XlsIO
Robert Clugston
Asked On November 17, 2009 03:53 PM

I'm experiencing an error when trying to add a conditional formula that checks if the value is an Alphabetic character. Below is a snippet demonstrating this issue:

IConditionalFormats condition = sheet.Range["A1:A20"].ConditionalFormats;
IConditionalFormat condition1 = condition.AddCondition();
condition1.FormatType = ExcelCFType.CellValue;
condition1.Operator = ExcelComparisonOperator.Equal;
condition1.FirstFormula = "\'r\'"; // ERROR HERE
condition1.FontColor = ExcelKnownColors.Red;
condition1.Color = ExcelKnownColors.Red;

The code will compile fine, however when ran the following unhandled exception is thrown:

Syncfusion.XlsIO.Implementation.Exceptions.ParseException was unhandled
Message="r is not valid named range"
Source="Syncfusion.XlsIO.Base"
StackTrace:
at Syncfusion.XlsIO.Implementation.FormulaParser.CreateLocalName(Int32 iRefIndex, String strToken, ParseParameters arguments, Dictionary`2 indexes, Int32 i, ExcelParseFormulaOptions options)
at Syncfusion.XlsIO.Implementation.FormulaParser.CreateNamedRange(String strToken, ParseParameters arguments, Dictionary`2 indexes, Int32 i, ExcelParseFormulaOptions options, Int32 iRefIndex)
at Syncfusion.XlsIO.Implementation.FormulaParser.ParseIdentifier(String identifier, Dictionary`2 indexes, Int32 i, ExcelParseFormulaOptions options, ParseParameters arguments)
at Syncfusion.XlsIO.Implementation.FormulaParser.ParseFirstOperand(Priority priority, Dictionary`2 indexes, Int32 i, ExcelParseFormulaOptions& options, ParseParameters arguments)
at Syncfusion.XlsIO.Implementation.FormulaParser.ParseExpression(Priority priority, Dictionary`2 indexes, Int32 i, ExcelParseFormulaOptions options, ParseParameters arguments)
at Syncfusion.XlsIO.Implementation.FormulaParser.Parse(String formula, Dictionary`2 indexes, Int32 i, ExcelParseFormulaOptions options, ParseParameters arguments)
at Syncfusion.XlsIO.Implementation.FormulaUtil.ParseString(String strFormula, IWorksheet sheet, Dictionary`2 indexes, Int32 i, Dictionary`2 hashWorksheetNames, ExcelParseFormulaOptions options, Int32 iCellRow, Int32 iCellColumn)
at Syncfusion.XlsIO.Implementation.ConditionalFormatImpl.set_FirstFormula(String value)
at Syncfusion.XlsIO.Implementation.ConditionalFormatWrapper.set_FirstFormula(String value)
at ExcelTestApp.Program.Main(String[] args) in C:\temp\ExcelTestApp\ExcelTestApp\ExcelTestApp\Program.cs:line 22
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:


I attempted a number of variants for escaping the alphabetic character however nothing was successful.

Attached is a sample solution which demonstrates the issue. A support incident was opened for this (Incident #62049).




ExcelTestApp_54f929f9_3a391471.zip

Administrator [Syncfusion]
Replied On November 18, 2009 07:02 AM

Hi Robert,

Thank you for using Syncfusion products.
Its possible to use alphabetics and numbers in conditional formula.The conditional formula is only for setting the Range.I have attached the sample program.
Please refer the sample and let us know if you have any questions.

Regards,
Balamurugan





Alphabetical CharConditional_327ff132.zip

Sridhar [Syncfusion]
Replied On August 30, 2012 02:38 AM

Hi Robert,
 
Please let us know the above sample solved the query reported in this forum and let us know if you require any further assistance 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.

;