[AccessD] Linking Excel with password. Error 3161: Cannot decrypt file

MartyConnelly martyconnelly at shaw.ca
Thu May 6 13:53:33 CDT 2004


That's kind of an old version of Excel. It is Excel  95 that you are 
calling. You could try 8.0

See SAMPLE: ExcelADO Demonstrates How to Use ADO to Read and Write Data 
in Excel Workbooks
http://support.microsoft.com/default.aspx?scid=kb;en-us;278973

 or
http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderForMicrosoftJetExcel
http://www.able-consulting.com/MDAC/ADO/Connection/ODBC_DSNLess.htm#ODBCDriverForExcel
Gustav Brock wrote:

>Hi all
>
>If you try to link/attach an Excel range where the workbook is
>password protected (Save as .. with password), you'll receive the
>error above. 
>The wizard can not accept a password.
>
>I tried, in code, to modify the connect string with
>
>  PWD=mypassword;
>
>so it becomes
>
>  Excel 5.0;HDR=YES;IMEX=2;PWD=mypassword;DATABASE=c:\temp\Test.xls
>
>but that is not recognized when I try to do a RefreshLink - same
>error.
>
>Is this possible?
>
>/gustav
>
>  
>

-- 
Marty Connelly
Victoria, B.C.
Canada






More information about the AccessD mailing list