I tried to load excel file using C1Excel. Everything works fine until I loaded excel file and had activex with it. The error said:
This file cannot be read because it is password-protected.
But, It is no need password to open the file. The code is below.
C1XLBook book = new C1XLBook();
book.Load("excelfile.xls"); //Here is the error code appear
foreach (XLSheet loopSheet in book.Sheets)
{
//code
}
So, if anyone ever find this problem and solved it, please to share.
I have tried that file can be loaded by Microsoft.Office.Interop.Excel
.
Is there any method or something that C1Excel can load data from it. I wish I could use Microsoft.Office.Interop.Excel
to replace C1Excel, but the project has code already with C1Excel
every where.
Thank you