Error on opening Excel 2007(.xlsx) on office 2003 machine.

V

voidshyam

I am working on the project where I need to open programmatically, password
protected office 2007 files (particularly excel and ppt files) on a machine
which has office 2003 installed.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top