views:

22

answers:

2

I am currently working in a C# application which has a class which will generate an excel file. Everything went smooth. The data populated on the excel sheet has 'Times New Roman' has font. I would like to change it to some other fonts (Calibari). How can I do that programmatically.

A: 

Have you tried something like this:

new Font("Arial", 10, FontStyle.Bold);
Voulnet
_range.Font = new Font("Arial", 16, FontStyle.Bold);It didn't work.
Sathish
Have you tried it in your code context? See how .NET works with Font classes and how it builds a 'fonty' text.
Voulnet
A: 

I have gave up. As there seems to be no way to change the font family inside excel sheet programmatically in C# :(

Sathish