Free Support Forum - aspose.com

Error saving then opening Excel file

Version: 8.5.1


For the attached file, why do I get an error for the following code:

Workbook workbook = new Workbook(@“C:\Example.xls”);
workbook.Save(@“C:\Example.xlsx”, SaveFormat.Xlsx);
workbook = new Workbook(@“C:\Example.xlsx”); //error on this line: Object reference not set to an instance of an object.

Hi,


Thanks for template file and sample code.

After an initial test, I observed the issue as you mentioned. I found the exception “Object reference not set to an instance of an object” when opening the re-saved XLSX file via Aspose.Cells APIs. I used the following sample code to first convert your template XLS file to XLSX and then open it via Aspose.Cells APIs:
e.g
Sample code:

Workbook workbook = new Workbook(@“e:\test2\Example.xls”);
workbook.Save(@“e:\test2\outExample1.xlsx”, SaveFormat.Xlsx);
workbook = new Workbook(@“e:\test2\outExample1.xlsx”); //error on this line: Object reference not set to an instance of an object.

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

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

Thank you.


Hi,

Please try our latest version/fix: Aspose.Cells for .NET v8.5.1.3

We have fixed your issue now.

Let us know your feedback.

Thank you.

Yes, that seemed to fix the issue. When will this be in an official release?

Hi,

Well, you can use this fix (v8.5.1.3) as an official release. It is an intermediate kind of version which is provided as a fix against some bugs/new features full fledged. Normally, this kind of version is posted in the support forums. You can use this version for your requirements; it will behave like an official release. However, our next official release (v8.5.2) is scheduled to be released in the third week of August, 2015, the date is not final though.

Thank you.

The issues you have found earlier (filed as CELLSNET-43810) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.