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

Add ConditionalFormats

Thread ID:





92386 Jan 12,2010 07:55 AM UTC Jan 12,2010 10:36 AM UTC ASP.NET Web Forms (Classic) 1
Tags: XlsIO
Marcia van de Leur
Asked On January 12, 2010 07:55 AM UTC


I try to add conditional formats to a cell. But when I run the code sheet[x,y].ConditionalFormats.AddCondition() I get the ArgumentOutOfRangeError 'Too many conditional formats'.

I tried to add the conditional formats in the excel template directly, but only 3 conditional formats remain in my excel template, the 4th one has disappeared in the excel file (while it is in the template)

Lokesh R [Syncfusion]
Replied On January 12, 2010 10:36 AM UTC

Hi Marcia,

Thank you for your interest on Syncfusion products.

Excel allows the addition of a maximum of three conditions only, for the same cell in the Biff8 format(Excel 2003 format).

XlsIO allows to create conditional formats using IConditionFormats, and various conditions can be set using its properties. It also provides support for applying more than three conditional formats in the same cell, in the .xlsx (Excel 2007)format,which is a constraint in Excel2003 format as i have mentioned earlier(allows only 3 conditions to be applied).

Could you please make the below changes in your code.so,that it would work as you expected.

IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Excel2007;
IWorkbook workbook = application.Workbooks.Create(1);

and save the file in XLSX format as below:


For more information about conditionalformatting,please visit


please let me know if this helps.



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