Click here to Skip to main content
12,953,652 members (39,049 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
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
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.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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[^]
  Permalink  
v2
Rate this: bad
 
good
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;
  Permalink  
v2

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
OriginalGriff 6,429
CHill60 3,490
Maciej Los 3,103
ppolymorphe 2,020
Jochen Arndt 1,975


Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 22 Jan 2013
Copyright © CodeProject, 1999-2017
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