PC Review


Reply
Thread Tools Rate Thread

Check if Excel file is password protected

 
 
Christopher J Tallos
Guest
Posts: n/a
 
      6th Apr 2007
The follwing code throws up a prompt for a password when the Excel file is
password protected (it is vb.net).

ExcelWorkBook = ExcelApplication.Workbooks.Open(ExcelFullName, Nothingobj,
True, Nothingobj, Nothingobj, Nothingobj, Nothingobj, Nothingobj,
Nothingobj, Nothingobj, Nothingobj, Nothingobj, Nothingobj, Nothingobj,
Nothingobj)

How do I detect in code (vb.net or c#) if an Excel workbook is password
protected when I get the prompt for password at the same time I am trying to
open it?


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to open Excel 2003 / 2007 password protected file in Excel 200 KartnKrazy Microsoft Excel Misc 0 16th Oct 2008 11:14 AM
Password protected Excel File IT Service Agent Microsoft Excel Misc 1 20th May 2008 07:34 PM
Programatically check whether pst file is password protected or not? ashwin Microsoft Outlook 2 4th Jan 2007 12:48 PM
how to automate opening a password protected excel file? e.g. a .xls that has a password set in the security tab. Daniel Microsoft Excel Discussion 1 24th Jun 2005 12:28 AM
how to automate opening a password protected excel file? e.g. a .xls that has a password set in the security tab. Daniel Microsoft Excel Worksheet Functions 0 23rd Jun 2005 11:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:28 AM.