DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Accessing Password Protected Excel Files

  1. #1
    Stephen Price Guest

    Accessing Password Protected Excel Files

    Dear All,

    I am opening up Excel in the background to work on a couple of cells. The
    Workbook is password protected, and although I could put in the password
    every time, the application is also meant to run in the background. My
    question is whether it is possible to open up the Spreadsheet and enter the
    password all in my code so there is no user interaction.

    Any help would be gratefully received



  2. #2
    ibby Guest

    Re: Accessing Password Protected Excel Files

    Hi Stephen,

    Use the Password parameter of the Open method:

    oExcel.Workbooks.Open _
    FileName:="C:\myBook.xls", _
    Password:="mypassord"


    --
    Hope this helps.
    Regards
    ibby

    Please post replies or follow-ups to the **newsgroup** so that participants
    may benefit or contribute.


    "Stephen Price" <Stephen.price@europlacer.co.uk> wrote in message
    news:392d18de@news.devx.com...
    > Dear All,
    >
    > I am opening up Excel in the background to work on a couple of cells. The
    > Workbook is password protected, and although I could put in the password
    > every time, the application is also meant to run in the background. My
    > question is whether it is possible to open up the Spreadsheet and enter

    the
    > password all in my code so there is no user interaction.
    >
    > Any help would be gratefully received
    >
    >




  3. #3
    Stephen Price Guest

    Re: Accessing Password Protected Excel Files

    That did the trick, Thanks.


    ibby <ibby_e@bigpond.com> wrote in message news:392d3238@news.devx.com...
    > Hi Stephen,
    >
    > Use the Password parameter of the Open method:
    >
    > oExcel.Workbooks.Open _
    > FileName:="C:\myBook.xls", _
    > Password:="mypassord"
    >
    >
    > --
    > Hope this helps.
    > Regards
    > ibby
    >
    > Please post replies or follow-ups to the **newsgroup** so that

    participants
    > may benefit or contribute.
    >
    >
    > "Stephen Price" <Stephen.price@europlacer.co.uk> wrote in message
    > news:392d18de@news.devx.com...
    > > Dear All,
    > >
    > > I am opening up Excel in the background to work on a couple of cells.

    The
    > > Workbook is password protected, and although I could put in the password
    > > every time, the application is also meant to run in the background. My
    > > question is whether it is possible to open up the Spreadsheet and enter

    > the
    > > password all in my code so there is no user interaction.
    > >
    > > Any help would be gratefully received
    > >
    > >

    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center