Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with Interop Excel:Opening password protected files

46 views
Skip to first unread message

sharish78

unread,
Jan 17, 2008, 8:35:00 AM1/17/08
to
Hi,
We have an ASP.NET/C# application using AJAX 1.0.

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

Filippo

unread,
Mar 14, 2008, 2:28:01 PM3/14/08
to
Hey there,

Did you ever manage to find out how to open password protected XLS files
without showing any dialog box ?

Thanks,
Filippo

Avinash T

unread,
Dec 22, 2008, 7:31:35 AM12/22/08
to
Hi Sharish, did you find any solution for this?

Please help incase you got the solution

Thanks
Avinash
avic...@gmail.com

url:http://www.ureader.com/msg/1032230.aspx

0 new messages