While creating spreadsheets whith EPPlus (6.0.3 and 6.0.4) I noticed Calibri as the default font. From what I understood, it is specified into the EPPlus code (FileSize.cs):
public cont string DefaultFont = "Calibri";
The result is that all document will receive this format, including default NamedStyle.
We have to make Arial font, and couldn't find a way to achieve this. While "Style.Font" seems to work, it only does it partially (only the specified range will change, leaving all other cells with Calibri) and requires more coding and computing (several large output files being generated). We also tried changing default NamedStyle, with no success.
I tried the below code to set Arial as default, with no success either. I chose this position to be just before the new file being created, in a hope that it would accept the new font.
...
try
{
const string DefaultFont = "Arial";
ExcelFont.SetFromFont(DefaultFont, 100, false, false, false, false);
using (var excel = new ExcelPackage())
{
...
The above code had an error:
An object reference is required for the non-static field, method, or property 'ExcelFont.SetFromFont(string, float, bool, bool, bool, bool)'
I also tried to compile DLL locally (with the DefaultFont set to Arial) but EPPlus have several .Net requirements that I couldn't make it work.
While browsing EPPlus code I noticed several fonts within the project, including Arial (at 4th position) but couldn't find a way to use it.
Any ideas on how to proceed?