Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
CSS
Hi,

I am generating  excel sheet from c#.net. I did everything except one thing.I have a row headers like AccountNumber,AccountHolderName,AccountHolderAddress,AccountHolderBranch.

I want to find them runtime using c# code and if those headers are available on that excel then i need to make them bold.

Also find some headers and make them background color and bold.

Is anyone did this, then please share with me as google does not having exact solution as such?

Thanks!
Posted

1 solution

By using Range you can set bold and backcolor
C#
 Excel.Range chartRange ;
chartRange = xlWorkSheet.get_Range("b4", "e4");
            chartRange.Font.Bold = true;

where b4 and e4 means the cell index you want to bold

Hope this helps
 
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