I’m just posting because I faced a strange problem. I am trying to open a file which is protected by password (workbook protection using Excel 2007). For some reason, the method Open does seems to fail, but in fact, nothing is loaded into my variable. Here is the exemple I tested:
I opened Excel, save a file in format 2003 (xls) called file_unprotected.xls.
Then I saved the same file in format 2007 called file_unprotected.xlsx
Then I protect the file and save it as file_protected.xls and file_protected.xlsx.
Finally I run the following code:
Workbook w1 = new Workbook();
Workbook w2 = new Workbook();
Workbook w3 = new Workbook();
Workbook w4 = new Workbook();
Workbook w5 = new Workbook();
The output of my program is
3 3 3 0 3.
So to solve that problem, I have to specify the file format (Excel2007Xlsx). Is this normal that there is not even an exception raised in the scenario 4?