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

Accessing Cell's Conditional Formatting Color Scale value

Does anyone know of a way to programatically get the Conditional Formatting color of a cell, specifically from Color Scales?

Using IRange.CellStyle.Color I can get the fill color of a cell. However if the user has created a Conditional Formatting Color Scales I haven't been able to figure out how to get the cell color.

I've figured out that IRange.ConditionalFormats gives me access to the information about the conditional formats and I can interrogate each individually. I can also use the IConditionalFormat.FormatType to determine if it is a ColorScale. I was hoping that there was a property that would just provide me color, but since I don't see that I tried to go the route of calculating it.

I've attached a really simple example excel workbook that has 6 formatted cells. Using IConditionalFormat.ColorScale.Criteria I believed that I could try to compare the cell text to the Criteria's Value using the Operator and then know which color. However, even though I have 6 unique colors I'm only getting 3 criteria.

tl;dr: Is there property that provides the cell color being set by Conditional Formatting, if not is there a way to figure it out and specifically for ColorScale Conditional Formatting?

Thanks,
Travis

Attachment: Book1_87b56ac9.zip

3 Replies

KD Kesavan D Syncfusion Team July 20, 2016 07:20 AM UTC

Hi Travis, 
  
XlsIO doesn’t have support to calculate and return color scale value of a cell and have logged feature report regarding this. A support incident to track the status of this feature has been created under your account. Please log on to our support website to check for further updates 
  
  
Please let me know if you have any questions. 
  
Regards, 
Kesavan 



TS Travis Schilling July 20, 2016 04:16 PM UTC

Thanks for the quick response Kesavan!

Bummer that it doesn't have it. Hopefully there will be bandwidth in the future for them to cover this feature, but I appreciate knowing so I didn't spend more time searching.

Thanks again,
Travis


KD Kesavan D Syncfusion Team July 21, 2016 06:46 AM UTC

Hi Travis, 

Sorry to disappoint you, you can track the information about this feature implementation in the support incident which is created under your account.  

Regards, 
Kesavan 


Loader.
Up arrow icon