开发者

Is there a way to color selected cells of an Excel file using C#?

开发者 https://www.devze.com 2023-03-01 22:37 出处:网络
I am comparing two excel fi开发者_C百科les cell by cell. One is source file and another is target file.I want to color those cells which are not matching in the target file.

I am comparing two excel fi开发者_C百科les cell by cell. One is source file and another is target file.I want to color those cells which are not matching in the target file. Is there any way to do this without creating any other excel sheet for those cells which are not matching. I mean to say I want to fill color in those cells which are not matching in target file..


oResizeRange is a range of cells you selected. It's of type Office.Interop.Excel.Range

oResizeRange.Interior.ColorIndex = someindex;

Source

0

精彩评论

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