本文介绍了在excel中,多个细胞如何处于边界样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在excel多个单元格中处于边框样式。



我的代码如下;





in excel mutiple cells to be in border style.

my code as follows;


chartRange = xlWorkSheet.get_Range("A" + xlRow, "A" + xlRow);
                     chartRange.BorderAround(Excel.XlLineStyle.xlContinuous, Excel.XlBorderWeight.xlMedium, Excel.XlColorIndex.xlColorIndexAutomatic, Excel.XlColorIndex.xlColorIndexAutomatic);
                     chartRange = xlWorkSheet.get_Range("B" + xlRow, "B" + xlRow);
                     chartRange.BorderAround(Excel.XlLineStyle.xlContinuous, Excel.XlBorderWeight.xlMedium, Excel.XlColorIndex.xlColorIndexAutomatic, Excel.XlColorIndex.xlColorIndexAutomatic);
                     chartRange = xlWorkSheet.get_Range("C" + xlRow, "C" + xlRow);
                     chartRange.BorderAround(Excel.XlLineStyle.xlContinuous, Excel.XlBorderWeight.xlMedium, Excel.XlColorIndex.xlColorIndexAutomatic, Excel.XlColorIndex.xlColorIndexAutomatic);
                     chartRange = xlWorkSheet.get_Range("D" + xlRow, "D" + xlRow);
                     chartRange.BorderAround(Excel.XlLineStyle.xlContinuous, Excel.XlBorderWeight.xlMedium, Excel.XlColorIndex.xlColorIndexAutomatic, Excel.XlColorIndex.xlColorIndexAutomatic);
                     chartRange = xlWorkSheet.get_Range("E" + xlRow, "E" + xlRow);
                     chartRange.BorderAround(Excel.XlLineStyle.xlContinuous, Excel.XlBorderWeight.xlMedium, Excel.XlColorIndex.xlColorIndexAutomatic, Excel.XlColorIndex.xlColorIndexAutomatic);
                     xlRow = xlRow + 1;





当我输入上面的代码输出如下;



AFF

日期Session1 Session2 Session3 Session4

14/1/2013 cm rk vk

15 // 2013 MK Rj GS

16/1/2013 RK CM VK。





来自输出的边框仅限如下;





14/1/2013 cm rk vk

15 // 2013 MK Rj GS

16/1/2013 RK CM VK



边框不会如下所示;



AFF

日期Session1 Session2 Session3 Session4





i想要边框t o来到以上两行。我可以帮助我。



来自我上面的代码wat更改是必需的。



when i type the above code output as follows;

AFF
Date Session1 Session2 Session3 Session4
14/1/2013 cm rk vk
15//2013 MK Rj GS
16/1/2013 RK CM VK.


from the output the border is coming only for as follows;


14/1/2013 cm rk vk
15//2013 MK Rj GS
16/1/2013 RK CM VK

Border is not coming for as follows;

AFF
Date Session1 Session2 Session3 Session4


i want the border to come for the above two lines.how can i do,help me.

from my above code wat changes are required.

推荐答案


这篇关于在excel中,多个细胞如何处于边界样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 22:28