Thanks for the sample files and details.
First of all I would like to comment on 2) and 3). Please note, Aspose.Cells follows and mimics MS Excel standards and specifications when loading/opening the Excel files via the APIs. I found when I tried to open the files from “File format and extension” folder in MS Excel (manually), I found MS Excel could not open the files being corrupted. When loading/reading the files from this folder, Aspose.Cells will also throw exception “xml file is corrupted” and rightly so. Similarly, when I tried to open the files from “Microsoft graphs and gallery files” folder in MS Excel (manually), I found MS Excel could not open the files being Microsoft chart gallery files. When loading/reading the files from this folder, Aspose.Cells throws an exception “This Excel files contains Microsoft Graph Charts” and rightly so. So, for 2) and 3), there is no issue on Aspose.Cells’ end.
Now coming to 1) and 4), you are right, I got the same results as per your findings. Here is the detail for both.
1). I was able to reproduce the issue as you mentioned when loading the file from folder “Issue with content” using the following sample code. I checked/tested and MS Excel can open the file fine finally with a few prompts/error messages.
FileStream fstream = new FileStream("g:\\test2\\test_files\\Issue with content\\NERV001_00014363.xls", FileMode.Open);// File is corrupted - Not Ok as MS Excel can open the file fine
var loadOptions = new LoadOptions(LoadFormat.Auto);
//Load stream from file store.
var workbook = new Aspose.Cells.Workbook(fstream, loadOptions);//exception.
I have logged a ticket with an id “CELLSNET-55254” for the issue. We will look into your issue soon.
PS. I also tested with other files in “Issue with content” folder and Aspose.Cells is rightly giving the exception “File is corrupted” as when opening the other files (except the above mentioned in the code segment), I could not open other files into MS Excel manually. So, the ticket “CELLSNET-55254” is logged for single file only.
4). I was able to reproduce the issue as you mentioned when loading the files from “Protected view files” folder using the following sample code. I checked/tested and MS Excel can open the files fine but in Protected View.
//FileStream fstream = new FileStream("g:\\test2\\test_files\\Protected view files\\NERV001_00002406.xls", FileMode.Open); //Index was outside the bounds of the array. Not Ok, MS Excel can open the file fine in Protected view
//FileStream fstream = new FileStream("g:\\test2\\test_files\\Protected view files\\NERV001_00020032.xls", FileMode.Open); //Index was outside the bounds of the array. Not Ok, MS Excel can open the file fine in Protected view
FileStream fstream = new FileStream("g:\\test2\\test_files\\Protected view files\\NERV001_00033652.xls", FileMode.Open); //Index was outside the bounds of the array. Not Ok, MS Excel can open the file fine in Protected view
var loadOptions = new LoadOptions(LoadFormat.Auto);
//Load stream from file store.
var workbook = new Aspose.Cells.Workbook(fstream, loadOptions);//exception.
I have logged another ticket with an id “CELLSNET-55255” for this issue. We will look into the details of the issue.
Once we have an update on any of the issues, we will let you know.