I have exported datatable to Excel successfully. Now I have to change some cell color using Conditional formatting in Excel sheet using C#. For example if a cell contains text as "Cat" it should be display in Green color and if a cell contains text as "Dog" it should display in blue Color. Now how can I do this?
1
votes
You must try this yourself. Its not that difficult.
- Aseem Gautam
@Surya: Theres galactic-ally huge amount of stuff floating around, specifically related to excel formatting, just google!
- KMån
How are you exporting it? And is there any example code of how you did this? This isn't a very helpful answer/question for others
- TamusJRoyce
2 Answers
0
votes
Click the cell and select "Conditional formatting" from the menu. Then select something like "rules for cells that equals". Fill in "Cat" as what is should be equal to and choose your formatting.
Check this: http://www.contextures.com/xlcondformat03.html
0
votes