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

Free Support Forum - aspose.com

Object Reference error saving XLS

I am using Aspose.Cells version 8.6.3.0
I am getting Object reference not set to an instance of an object on the ff sample code :

private void SaveFile (Workbook book)
{
String lPath = "C:\book.xls";
book.Save(lPath, SaveFormat.Auto);
}

or I have tried,
book.Save(lPath, SaveFormat.Excel97To2003);

or I have tried,
book.Save(lPath,new XlsSaveOptions(SaveFormat.Excel97To2003));


BUT successful when saving to xlsx and xlsm with SaveFormat.Auto

Hi,

Thanks for your posting and using Aspose.Cells.

We have looked into your code and it looks fine. Are you getting this problem with specific excel file or with all excel files. Please share a sample console application project with us causing this exception. We will look into it and help you asap.

Please also provide us the source excel file(s) used in your code for our investigation.

You may also download and give a try to latest version

        <a href="https://forum.aspose.com/t/36555">Aspose.Cells
            for .NET v8.6.3.5</a>
         to see if it makes any difference.<br><br>