Results 1 to 6 of 6
  1. #1
    Join Date
    May 2003
    Posts
    8

    Question Unanswered: Opening password protected Excel files

    I have a stored procedure in which I am importing data from a password protected Excel file to a SQL table. The file comes from our client and the password cannot be removed before sending, per his company policy.

    I would like to create a DTS package to open the file and import the data. Is there a way to pass the password to the DTS package?

    Thanks!

  2. #2
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    May refer to this KBA.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  3. #3
    Join Date
    May 2003
    Posts
    8
    I can do this if I am using Excel, but I need to do it from a stored procedure. Is this possible using TSQL?

    Thanks!

  4. #4
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Honestly I never tried, you may search under SQL DTS for further information.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  5. #5
    Join Date
    May 2003
    Posts
    8

    Talking

    I got it!!! One of my coworkers (who was out when I needed the answer yesterday) had the solution!

    dtsrun /Sservername /Uuid /Ppwd /Npackagename /AFileName:8= excelfilename /APassword:8=excelpwd

    :-)

  6. #6
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Good keep it up, your reply help others.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •