Click here to Skip to main content
12,358,775 members (63,002 online)
Rate this:
Please Sign up or sign in to 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 21-Jan-13 22:42pm
Updated 21-Jan-13 23:14pm
Abhinav S 22-Jan-13 4:45am
Your question is already available at 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.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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

u can refer[^]
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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;

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.160621.1 | Last Updated 22 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100