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;
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.