Thanks for your posting and using Aspose.Cells for .NET.
Please download and use the latest version: Aspose.Cells
for .NET v18.104.22.168.
We have looked into your issue in detail and we were able to find this issue when the workbook is created using file stream.
However, when the workbook is created using file path, the issue does not occur. The first code throws exception, the second code works fine. Please check the attached output pdf generated by the second code.
We have logged this issue in our database. We will look into this issue and fix it. Once the issue is resolved or we have some other update for you, we will let you know asap.
This issue has been logged as CELLSNET-41303.
I have also attached the screenshot showing exception for a reference.
C# - Code 1
C# - Code 2
string filePath = @“F:\Shak-Data-RW\Downloads\Spreadsheet_Comma+Separated.csv”;
FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read);
var workbook = new Workbook(fs);
string filePath = @"F:\Shak-Data-RW\Downloads\Spreadsheet_Comma+Separated.csv";Exception:
var workbook = new Workbook(filePath);
workbook = new Workbook(filePath);
workbook.Save(filePath + ".out.pdf", SaveFormat.Pdf);
An unhandled exception of type '.' occurred in Aspose.Cells.dll
Additional information: Cannot read that as a ZipFileScreenshot: