Excel单元格着色 [英] excel cell coloring
本文介绍了Excel单元格着色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用C#上色Excel文件中的特定细胞。
我使用
I am using c# to color particular cells of excel file. i am using
Application excel = new Application();
Workbook wb = excel.Workbooks.Open(destPath);
Worksheet ws = wb.Worksheets[1];
ws.get_Range(ws.Cells[row, clmn]).Cells.Interior.Color = 36;
颜色cells..But这是不工作..
谁能帮我了..
to color cells..But this is not working.. Can anyone help me out..
推荐答案
尝试类似的东西。
ws.Cells[row, clmn].Interior.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Red)
这篇关于Excel单元格着色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文