.NET Core - Saving xlsx as pdf losses some charts on linux box



I am using .net core 2.1 and Aspose.Cells 18.6.0 to created PDFs files off of excel. It works great on a windows machine but some of the pie charts gets lost when creating on linux box.

Here is some background of our app:

  • App has an excel template file
  • For each file to be created
    ** Loads data from DB
    ** Adds data to template file
    ** Saves the data populated template excel file as PDF.

I am attaching template, and output files created in both excel and pdf versions on both windows and linux. Note: I generated excel version of output files for your troubleshooting purpose only.

You can see that some of the pie charts are misssing in linux version and also some other chart labels are cut off.

Please let me know if you need any other details.

Outputfiles.zip (425.0 KB)

Aspose Cells .NET Core 2.1 saving workbook as PDF fails on Linux box


Thanks for creating a separate thread for this issue. We have understood the problem but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSNET-46274 - .NET Core - Saving xlsx as pdf losses some charts on linux box



Please give a try to our latest fix Aspose.Cells for .NET 18.8.1 which should resolve this issue.

Let us know your feedback.


Doesnt look like the attached zip contains a version for .net core, can you please send me .net core version of the library? I will give it a try and let you guys know.



Well, it does. Please first download the zipped archive from the dropbox (which contains your desired version) and extract it to your desired directory/location. Please try extracting sub zip file again from the sub folder, i.e., “/Aspose.Cells for .NET 18.8.1\Aspose.Cells18.8.1 For .NetStandard20.zip”. Now use the Aspose.Cells.Dll library (which is .NET Core/Standard version) in your project.

Let us know if you still find the issue.


Yeah, I did try the standard version, its throwing below error so thought there is a separate version for core.

Exception thrown: ‘System.IO.FileNotFoundException’ in Aspose.Cells.dll

Above error happens when opening the template file, template file actually exists on the same directory as the executable.

Workbook workbook = new Workbook(_workbookName);




This is an IOException which is not being thrown by Aspose.Cells for .NET API. You can try to specify path to the input file as:

//for Windows
Workbook workbook = new Workbook("D:\\Example\\Path\\Test.xlsx"); 

//for Linux
 Workbook workbook = new Workbook("/home/user/Test.xlsx"); 

If the exception does not resolve then upload a sample project here. We will reproduce the problem and provide our feedback after analysis.


Yeah I tried giving full path and still no luck, here is a sample I created to repro the issue. You can have to upload the DLL reference path.

PlanCallPage.zip (39.4 KB)



We are trying to compile this project but we are getting compile time errors as follows:

/Users/testuser/PlanCallPage/CSC: Error CS1617: Invalid option ‘7.3’ for /langversion. Use ‘/langversion:?’ to list supported values. (CS1617) (PlanCallPage)

Please comment if you have also faced this issue and if you have resolved it, share the steps with us. Another option is to simplify the project more so that this type of issue is not there.


I dont get that error, seems like you dont have the required Core SDK installed or something.

This link has some insight on fixing that issue in your local machine: https://github.com/aspnet/Blazor/issues/871

More info about the sample app, its created in VS 2017 using .NET CORE 2.1. Hope that will help.



I have again created a simplest project with VS 2017 using .NET CORE 2.1 having following line of code only.

Workbook wb = new Workbook("TMP - Plan Call Page.xlsm");

This code works fine and no issue is observed. Please try this scenario with simplest project which contains single line of code like above. Or instead of loading some file try to load the license and check if path to license and library itself is working or not. Similarly try by creating a workbook from scratch and save it on disc using Aspose.Cells and see if library is loaded fine in your environment and performs this task or not.

I am afraid we are not able to re-produce this issue here and need to re-produce it here for providing our feedback.


Do you mind sharing your project so I can try and see if there is any difference?



Please give a try to the following sample project:
PlanCallPage2.zip (561.0 KB)


I see the difference, in your sample you are using Aspose 18.8.0 but I am using the patch version which is 18.8.1. Can you please try with the same dlls you sent me?



I have tried this issue using Aspose.Cells for .NET 18.8.1 and getting different error than mentioned by you. I get System.TypeInitializationException. Please give a try to the following sample project and share your feedback. We will log ticket as per the feedback provided by you.

PlanCallPage2 (2).zip (7.8 MB)


I am also getting the same error

System.TypeInitializationException: ‘The type initializer for ‘Aspose.Cells.Workbook’ threw an exception.’



We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSNETCORE-7 - Exception System.TypeInitializationException while creating object of Workbook



We are analyzing this issue and suggest you to install System.Drawing.Common and System.Text.Encoding.CodePages in the project PlanCAllPage2 and compile it again. You are requested to provide feedback after the said changes


Can you please elaborate what do you mean by install System.Drawing.Common and System.Text.Encoding.CodePages? .NET Core by default has those references so dont understand what that means.



Thank you for the feedback.

This was only meant to be sure that these assemblies are present in the project. As these are available and still issue is there, we are logging this information with the ticket for our later reference.