We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Cells changes arial font to calibri

Executing the following code results in the arial font in the attached workbook being changed to calibri:


Workbook oWorkbook = new Workbook (@“c:\temp\book1.xlsx”);
oWorkbook.Save(@“c:\temp\book2.xlsx”);

This problem has been occuring since upgrading to version 8.7 of aspose cells.

Hi Sarah,


Thank you for contacting Aspose support.

I have tested your presented scenario while using the latest revision of Aspose.Cells for .NET (Latest Version) (latest at the moment) and I am not able to replicate the said issue on my side, that is; the font for cell A1 remain Arial (size 11, style bold) in resultant spreadsheet. Please give a try to the latest revision and let us know of your feedback.

Appears to be fixed in that revision.

Thank you.

Hi Sarah,


Thank you for the confirmation. It is good to know that you are up & running again. Please feel free to contact us back in case you need our further assistance with Aspose APIs.

I have been experiencing the same issue, but with Cells 17.7 and 18.10. I created a brand new workbook in excel 2016, set the entire sheet to Arial 11 (in Excel, added a line, “testing the font” and saved it).

Then I added the following code in VB.NET and the resulting PDF comes out as Calibri

Dim strdoc as string = “C:\Test.xlsx”
Dim Savedoc as string = C:\Test.pdf"

dim wb as new aspose.cells.workbook(strdoc)

wb.save(savedoc)

the resulting PDF comes out in Calibri, how do I get it to come out in Arial?

Thanks in advance, Tom

@durhamcas,

Thanks for your query.

I have tried to reproduce this scenario using latest version Aspose.Cells for .NET 18.11.x, but no issue is observed. Different texts in Arial and Calibri font are rendered in their respective font in the PDF. You may please give it a try using latest version and share the feedback.

You may also try to set the custom font folder for checking your scenario as shown in the below sample code which sets different font folders for the API to use.

// Defining string variables to store paths to font folders & font file
string fontFolder1 = sourceDir + "Arial";
string fontFolder2 = sourceDir + "Calibri";
string fontFile = sourceDir + "Arial.ttf"; 

// Setting first font folder with SetFontFolder method
// Second parameter directs the API to search the subfolders for font files
FontConfigs.SetFontFolder(fontFolder1, true);

// Setting both font folders with SetFontFolders method
// Second parameter prohibits the API to search the subfolders for font files
FontConfigs.SetFontFolders(new string[] { fontFolder1, fontFolder2 }, false);

// Defining FolderFontSource
FolderFontSource sourceFolder = new FolderFontSource(fontFolder1, false);

// Defining FileFontSource
FileFontSource sourceFile = new FileFontSource(fontFile);

// Defining MemoryFontSource
MemoryFontSource sourceMemory = new MemoryFontSource(System.IO.File.ReadAllBytes(fontFile));

// Setting font sources
FontConfigs.SetFontSources(new FontSourceBase[] { sourceFolder, sourceFile, sourceMemory });