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

Help-Opening password protected excel 2007 file on office2003 mach

0 views
Skip to first unread message

voidshyam

unread,
Feb 25, 2008, 5:25:01 AM2/25/08
to
I have a requirement where I need to open the password protected Excel2007
file on machiine haveing office2003,though code and it should be invisible to
the user.

Whenever I am trying to open the password protected 2007 ppt or excel,
through code it is prompting to enter the password and application become
visible to the user, which is not intended behavior.

If same code is tried on the machine which has office 2007 installed, files
open correctly without prompting to enter the password and in invisible mode,
which is the intended behavior.

We are using ref to Microsoft.Office.Interop.Excel11.0 library to open the
file and fallowing C# code

Excel.Application _excelApp = null;
Excel.Workbook _book = null;
object readOnly = true;
object updateLinks = 2;
object _dontCare = Type.Missing;
object ignoreReadOnly = true;
object notify = false;

_excelApp = new Excel.Application();
_excelApp.Visible = true;
_excelApp.DisplayAlerts = false;
_excelApp.AutomationSecurity =
Microsoft.Office.Core.MsoAutomationSecurity.msoAutomationSecurityForceDisable;

_book = _excelApp.Workbooks.Open(@"C:\test.xlsx",
updateLinks,
readOnly,
_dontCare,
"test",
_dontCare,
ignoreReadOnly,
_dontCare,
_dontCare,
_dontCare,
notify,
_dontCare,
_dontCare,
_dontCare,
_dontCare);

Please let us know if you have any solution for this.

same behavior is identified for the powerpoint2007 files also.

but simmilar issue work fine with password protected office2007 word
file(.docx) on office 2003 machine.

My machine has .net PIA installed and also office 2007 file convector.


Filippo

unread,
Mar 14, 2008, 2:28:00 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

0 new messages