Problems converting Excel files to PDF

Program.zip (1.1 KB)
Hello,

We have problems converting Excel files to PDF files. All documents are based in a same base document, some of them are converted correctly and some never finish the conversion.

We have tested direct save to PDF and rendering images of each worksheet, both tests with same result.

Note. In rendering test we have observed that the problematic worksheet is “Proyecciones1”

We attach the Visual Studio project file with code simple and test files.

  • The document we can’t convert is “DocumentError.xlsx”

  • The document we can convert correctly is “DocumentOk.xlsx”

Best regardsDocumentError.zip (1.1 MB)
DocumentOk.zip (1.1 MB)

@Manel,

Thanks for the sample code with template file.

After an initial test, I am able to observe the issue as you mentioned by converting your template file “DocumentError.xlsx” to PDF file format. I found that the process never finishes, so we cannot convert his template file PDF file format.
e.g
Sample code:

Workbook wb = new Workbook("E:\\test2\\DocumentError.xlsx"); 
wb.Save("e:\\test2\\out1.xlsx"); 

I have logged a ticket with an id “CELLSNET-46134” for your issue. We will look into it soon.

Once we have an update on it, we will let you know here.

Thanks for the quick reply.

We attach more information and samples.

In these samples, we have reproduced the problem with a very simple Excel file.

Apparently, the problem lies in the number decimal places, when these numbers are shown in graph.

In the sample code file, we have generated a log file with these results:

Save XLSX. Decimal places: 2 | Elapsed time: 0,46443 seconds.
Convert to PDF. Decimal places: 2 | Elapsed time: 1,1449263 seconds.

Save XLSX. Decimal places: 3 | Elapsed time: 0,005897 seconds.
Convert to PDF. Decimal places: 3 | Elapsed time: 0,2339373 seconds.

Save XLSX. Decimal places: 4 | Elapsed time: 0,0048003 seconds.
Convert to PDF. Decimal places: 4 | Elapsed time: 2,6156442 seconds.

Save XLSX. Decimal places: 5 | Elapsed time: 0,0049314 seconds.
Convert to PDF. Decimal places: 5 | Elapsed time: 23,9487595 seconds.

Save XLSX. Decimal places: 6 | Elapsed time: 0,0108945 seconds.

The last line “Convert to PDF…” does not appear, because the process of saving as PDF does not end.

Best regards

Samples.zip (52.0 KB)

@Manel,

Thanks for providing template files and findings

I tested using your files a bit and you are right. We need to evaluate the files as well, i.e., “GraphWith_5_DecimalPlaces.xlsx” takes more time and “GraphWith_6_DecimalPlaces.xlsx” whose process never finishes for rendering to PDF. I have recorded your findings with attachments against your issue into our database. We will evaluate your issue in details.

Once we have any new information, we will share it with you.

@Manel,

Please try our latest hotfix/version: Aspose.Cells for .NET v18.5.1, it should fix your issue:

Let us know your feedback.

The issues you have found earlier (filed as CELLSNET-46134) have been fixed in Aspose.Cells for .NET 18.6. Please also check the document/article for your reference: Install Aspose Cells through NuGet|Documentation