细胞在BOLD Letter中 [英] cell to be in BOLD Letter

查看:74
本文介绍了细胞在BOLD Letter中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

xlRow = xlRow + 1;
                   xlWorkSheet.Cells[xlRow, 1] = "Date";
                   xlWorkSheet.Cells[xlRow, 2] = "Session1 ";
                   xlWorkSheet.Cells[xlRow, 3] = "Session2 ";
                   xlWorkSheet.Cells[xlRow, 4] = "Session3 ";
                   xlWorkSheet.Cells[xlRow, 5] = "Session 4";
                   xlRow = xlRow + 1;



然后我擅长如上面的代码





日期Session1 Session2 Session3 Session4





以上代码正常运行。我想要日期Session1 Session2 Session3 Session4



BOLD信我怎么能从我的代码看做。


then i excel as follwos teh above code


Date Session1 Session2 Session3 Session4


the above code is working. i want the Date Session1 Session2 Session3 Session4

in BOLD Letter how can i do from my code wat to do.

推荐答案

oSheet.get_Range("A1", "D1").Font.Bold = true;
        oSheet.get_Range("A1", "D1").VerticalAlignment =
            Excel.XlVAlign.xlVAlignCenter;





u可以参考

http://support.microsoft.com/kb/ 302084 [ ^ ]

xlWorkSheet.get_Range("A1", "D1").Font.Bold = true;
xlWorkSheet.get_Range("A1", "D1").Font.Color = Color.Blue;
xlWorkSheet.get_Range("A1", "D1").Borders.Color = Color.Violet;
xlWorkSheet.get_Range("A1", "D1").Borders.LineStyle = XlLineStyle.xlContinuous;
xlWorkSheet.get_Range("A1", "D1").Borders.Weight = Microsoft.Office.Interop.Excel.XlBorderWeight.xlMedium;


这篇关于细胞在BOLD Letter中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆