What is the default font and font size of Excel report using Aspose

Hi Support,

I just want to ask what is the default font and font size being used when generating an Excel report using Aspose? We’re using Aspose.Cells we’re getting “Arial” size 10 and just want to confirm if this is the default? If so, how can we change these values?

Thank you very much.

@cmendoza,

Please note, when creating an empty (new) workbook (using new Workbook()) or from an existing CSV file, the default font and size would be “Arial 10”. When creating a Workbook from existing source file, e.g. XLSX file(e.g., new Workbook(srcFile)), the default font and size is dependent on the source file.

Moreover, you can change the font name and size in default style to change it accordingly. See the sample code segment for your reference:
e.g.
Sample code:

Workbook wb = new Workbook();
Console.WriteLine(wb.DefaultStyle.Font);
Style style = wb.DefaultStyle;
style.Font.Name = "Calibri";
style.Font.Size = 11;
wb.DefaultStyle = style;
Console.WriteLine(wb.DefaultStyle.Font);

Hope, this helps a bit.

Yes, this helps. Thank you.

@cmendoza,

Good to know that the provided details and sample code helps for your needs. Feel free to write us back if you have further queries or issue.