开发者

Cell color change In Excel Using Conditional formatting in C#

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 co开发者_开发技巧ntains text as "Dog" it should display in blue Color. Now how can I do this?


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


Refer to MSDN: http://msdn.microsoft.com/en-us/library/bb404903.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜