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

Free Support Forum - aspose.com

Excel-Object Reference error on workbook.Save()

Hi there,


We’re having a problem on saving our excel files. The attached document is in our tempfolder its ok, but we cant save the file on workbook.Save(tempfile). I checked the file in temp folfider with the same name, it seems no problem on temp file. But on the code workbook.Save we get object reference error and couldnt understand why.

Our system has an option to convert xls to pdf, when we use this option the document we can save or open file without an error. Its just only excel file we cant save. We use Aspose.Cells v7.7.2.0 but we are getting same error on the latest version.

By the way, we can save or open other excel files in same way. I wonder is there any problem which aspose cant handle in the some file contents, like styles,macros or fonts.

Hi,


Please download and try the latest major release: Aspose.Cells for .NET (Latest Version)

I have tested your scenario/ case using your template file with the following sample code, it works fine:
e.g
Sample code:

Workbook workbook = new Workbook(“e:\test2\OPET.FR.0309_0.xls”);

workbook.Save(“e:\test2\outOPET.FR.0309_01.xls”);

Thank you.