I’m facing an issue with your Aspose.Cells dll. Indeed, when I duplicate a special workbook (attached to this post : BFR - Comparaison Consolidé N et N-1_10.zip (52.4 KB))
, I cannot open the generated file with Excel 2016 because it says that the file seem to be corrupted.
However, everything is ok on Excel 2013.
Here is my code :
Workbook wb = new Workbook(Server.MapPath("~") + "workbook/BFR - Comparaison Consolidé N et N-1_10.xlsm");
wb.Save("C:/test.xlsm");
We have looked into your issue and found, the bug is because of older version of Aspose.Cells. We tested your issue with both versions and found, older version is generating corrupt Excel file while the latest version is generating the correct Excel file.
Please download the latest version (link given below). We have also provided the links of the Excel files generated with the older and newer version for your reference.
However i’m still able to reproduce this issue when I’m duplicating the attached workbook (48.5 KB) (Aspose.Cells : 17.6.2.0) and trying to open it with Excel 2016 x86 (Windows 10 Enterprise).
The error message is : “We found a problem with some content in ‘test.xlsm’.Do you want us to try to recover as much as we can? If you trust the source of this workbook, Click Yes”
Thanks for providing us sample file and further details.
I observed the issue as you mentioned by using your sample code with your original template file. I found that Workbook duplication generates corrupted file for Excel 2016/2007. Please note MS Excel 2007/2016 prompts an error message while MS Excel 2010 and 2013 open the file fine without any error message:
e.g Sample code:
Workbook wb = new Workbook("e:\\test2\\BFR - Comparaison Consolidé N et N-1_10.xlsm");
wb.Save("e:\\test2\\out1.xlsm") ;
I have logged a ticket with an id “CELLSNET-45502” for your issue. We will look into it soon.
Once we have an update on it, we will let you know here.
This is to inform you that we have fixed your issue (logged earlier as “CELLSNET-45502”) now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes