open password protected excel file using vb.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • veer
    New Member
    • Jul 2007
    • 198

    open password protected excel file using vb.net

    Hi
    i want to open excel file using vb.net . The file is passsword protected and i know the password

    when i used to open the file with out password it works fine and open
    but when the file with password protected file came it shows the error "File can't be decrypt"

    sconnectionstri ng ="Provider=Micr osoft.jet.oledb .4.0;data source=c:\new.x ls;Extended Properties=exce l8.0;

    please tell me how can i open the password protected excel file

    best regards
    varinder
  • Curtis Rutland
    Recognized Expert Specialist
    • Apr 2008
    • 3264

    #2
    According to connectionstrin gs.com it can't be done with ole. Maybe you can do it with ODBC, or perhaps there is a way with Interop.

    Comment

    • atishrg
      New Member
      • Apr 2008
      • 9

      #3
      Hey Buddy,

      I dont know how to open an excel file using connection string, But if you want I can tell you how to open a password protected file using COM wrapper,

      Means using Excel object..

      If you require this please let me know..

      ATishRG

      Comment

      Working...