Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C#
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;

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.
Posted
Updated 21-Jan-13 23:14pm
v2
Comments
Abhinav S 22-Jan-13 4:45am    
Your question is already available at http://www.codeproject.com/Questions/532226/inplusexcelplushowplustoplussetplusthepluscellplus. Kindly don't repost.
lukeer 22-Jan-13 5:40am    
Plus you got an answer there. If that doesn't work, please comment on the given solution so the poster knows it didn't work in this case.

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


u can refer
http://support.microsoft.com/kb/302084[^]
 
Share this answer
 
v2
C#
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;
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900