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. Image for the cookie policy date

How to copy conditional formatting using xlsio?

Is it possible to copy Conditional Formatting when inserting a row?

I have tried both InsertRow and CopyTo (with the various ExcelCopyRangeOptions). These functions do not seem to copy the conditional formatting.

I have also tried going through the ConditionalFormats collection in the previous row, and for each conditional format in the old row creating a new conditional format in the new row, copying each conditional format property individually. However the problem with this approach is that the formulas will not be updated automatically.

Thanks


5 Replies

MW Melba Winshia Syncfusion Team June 29, 2007 12:10 PM UTC

Hi SH,

Could you please open a new direct – trac incident with subject line as Forum 63163 - How to copy conditional formatting using XlsIO? So that it would be possible for us to provide more details regarding this issue.

Thanks,
Melba


RB Russell Baker May 2, 2012 06:58 PM UTC

Have there been any updates on this issue? I can't find this anywhere else.



MR Mahajothi R Syncfusion Team May 4, 2012 04:25 AM UTC

Hi Vikas,

Thank you for creating a new incident in Direct Trac for the above reported issue. We request you to follow the incident 93954 to know more details about the reported issue.

Please let us know if you need any further assistance.


Regards,
Mahajothi R.




PM Paul Meems September 28, 2017 12:16 PM UTC

I know this is an old post. But I'm facing the same problem.
I can't find the mentioned issue number.

I add rows to an existing Excel file and I want to copy the conditional formatting as it is defined in the Excel file.

Please advice.



AV Abirami Varadharajan Syncfusion Team September 29, 2017 10:38 AM UTC

Hi Paul, 
 
We request you to make use of `ExcelInsertOptions` enumeration while inserting new row to specify the formatting option as before or after the newly inserted row. Please refer the below documentation to know more about this. 
 
 
If you wish to copy conditional formats to newly inserted row then make use of `ExcelCopyRangeOptions` enumeration. Please refer the below documentation link for further details regarding this. 
 
 
We have also shared simple sample for your reference which can be downloaded from the following link. 
 
 
If your requirement differs from this scenario then kindly share your requirement in detail which will be helpful for us to provide prompt solution at the earliest. 
 
Regards, 
Abirami. 


Loader.
Live Chat Icon For mobile
Up arrow icon