Does anyone know how to use ADO to connect to an 97/95 Excel file with password. Please post some code. Thanks!
Printable View
Does anyone know how to use ADO to connect to an 97/95 Excel file with password. Please post some code. Thanks!
Help! Help! Help!
Try this code:
Dim ax As ADOX.Catalog
Dim cn As ADODB.Connection
Dim rs As Recordset
Dim i As Long
Dim j As Integer
Dim strTemp As String
Dim tbl As ADOX.Table
Set cn = New Connection
Set ax = New Catalog
'open connection
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Zip\ADO\Xls2Mdb\004.xls;Extended Properties=Excel 8.0;password=XXXX"
I tried the code, but getting error can not decrypt file.
Any other idea? Anyone?