We are experiencing the following error using Interop Excel.
When trying to open an Excel workbook that is password protected, an error
COMException
Exception message: The remote procedure call failed. (Exception from
HRESULT: 0x800706BE) occurs.
The browser goes about 25% of the way and then hangs.
The funny part is that the same code works on non-password protected files
without any error.
Configuration on Web server:
(1) Windows 2000 server
(2) IIS 6.0
(3) Excel version 2003 (11.8146.8107) SP2
The code that causes the problems is as follows
InteropExcel.ApplicationClass app = new
Microsoft.Office.Interop.Excel.ApplicationClass();
InteropExcel.Workbook workBook = app.Workbooks.Open(filename,
Missing.Value,Missing.Value,Missing.Value,strPassword,strPassword,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value,Missing.Value);
I found a similar post on this site but no solution.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=723627&SiteID=1
Searches on the Internet have yielded no help. Any pointers to the probable
cause of the problem will be appreciated.
Let me know if you need more information.
Thanks,
Harish
Did you ever manage to find out how to open password protected XLS files
without showing any dialog box ?
Thanks,
Filippo
Please help incase you got the solution
Thanks
Avinash
avic...@gmail.com