我需要知道如何从内部64位的Excel VBA外接打开一个32位的访问MDB文件。还有就是在互联网上的信息但代码中没有完整的具体的例子很多。我只是在找一个例子。
我正在运行Excel(64位),并已安装Office 2010 AccessDatabaseEngine_X64.exe以获取适当的Microsoft.ACE.OLEDB.12.0驱动程序。
connectionString = "Provider=Microsoft.ACE.OLEDB.12.0; " & _
"Data Source=" & dbPlanFile & "; "
dbPlanFile有效。
我尝试了以下连接字符串的各种组合,但无济于事。
connectionString = "Provider=Microsoft.ACE.OLEDB.12.0; " & _
"Data Source=" & dbPlanFile & "; " & _
"Extended Properties=""Excel 8.0;HDR=YES; """ & _
"Persist Security Info=False; " & _
"Jet OLEDB:Database Password=v83;Prompt=3;"
"Extended Properties=""Excel 12.0 XML;HDR=YES;IMEX=1; """
我怀疑我使用的驱动程序错误,或者连接字符串中缺少重要的内容。