Excel 2016: office has detected a problem with this file

I am on trial, using the latest Aspose.cells. I start by opening an existing “template” workbook with 2 sheets, one with a pivot table and one with raw data in a ListObject used by the pivot table.



I want to replace the data, refresh the pivot table, and save the workbook as a new workbook.



The new workbook shows the red error “problem with file”. The original workbook opens cleanly.



If I change the code to create a new workbook from scratch, it opens without errors.



Thank you!

Hi,


Thanks for your posting and using Aspose.Cells.

Please provide us runnable console application project with simplified sample code. It should use the latest version: Aspose.Cells for .NET v9.0.9.0. We tried to run your code but it gave some errors and we are unable to compile it. I have attached the screenshot for your reference.

If possible, please also let us know if this issue only occurs in Excel 2016 or it also occurs in previous versions like 2013 or older.

While providing the code, please remove all the unneeded and unnecessary code and all the third-party code. Only provide the code that is related to Aspose.Cells and that could replicate the issue with minimal lines. All these things will help us replicate and fix your issue quickly. Thanks for your cooperation in this regard and have a good day.

Thank you for your response. It’s actually very easy to duplicate. If you download this excel file from the URL below, you will see the red error upon opening “There is a problem with this file.”

https://shuristoragestd.blob.core.windows.net/user-development/rshurishuri.com-13225fec-38ee-4663-9e50-92f2c24f9f65/output.xls

Do you know how I can get rid of that red error?

Thanks,
Rick

Hi,


Thanks for your posting and using Aspose.Cells.

We have seen this problem and attached the screenshot for your reference. The file looks corrupt. One way to get rid of this problem is to try different settings of Microsoft Excel Trust Center (as shown inside the screenshot) and another way is to fix the code with which you are generating the excel file.

The problem might also occur because of some bug in Aspose.Cells. Please download and try the latest version: Aspose.Cells for .NET (Latest Version) and see if it makes any difference in resolving this issue.

If your issue still occurs, then please provide us simplified console application project which we could run at our end and replicate the issue. We will look into your code, if there is some error in your code, we will fix it and if there is some bug in Aspose.Cells, we will log an issue for it in our database so that it could be fixed in future releases. Thanks for your cooperation in this regard and have a good day.

This turns out to be an issue downloading an .xls file directly from Azure storage. If I go through a server, use the Azure SDK to get the file and then build a Response object with all the proper headers, it works.

Hi,


Thanks for your information and using Aspose.Cells.

It is good to know that you were able to find some of the root causes of this issue. It will be helpful if you could drill it down further and provide us some running application which we could investigate at our end and submit to product team. Thanks for your cooperation in this regard.