0
votes

I have a requirement where I need to connect password protected excel and read data by considering excel as DB. I use below DB connection string for connection. My problem is if the excel is password protected, then how do i pass my password via DB connection string? Any help is really appreciated.

Without password protected excel the below db connection string works fine. But i need help for password protected excel.

Connection string:: With dbConnectiion .Provider = "Microsoft.ACE.OLEDB.12.0;" .connectionString = "Data Source=" & strFileName & ";Extended Properties=Excel 12.0 Xml;HDR=NO;IMEX=1;" .ConnectionTimeout = 40 .Open End With`

1
Were you trying to connect data from one excel workbook to another, or from another application to an excel workbook which was password protected? If latter what is the application? - Terry W

1 Answers

0
votes

Data in an Excel workbook that has been protected with a password can only be accessed by opening Excel and providing the password. The Excel desktop application handles the security and encryption involved in password protecting and is required to unlock the workbook. This is a good thing. It helps protect the data in the workbook.

It seems that trying to create solutions that pull password protected data are working against the initial intention of the password protection.