将excel电子表格作为表从Access数据库而不是currentDB导入 [英] Import an excel spreadsheet as a table from an access database not the currentDB
问题描述
我有两个包含各种表格的数据库。 我希望用户能够进入其中一个数据库并将excel电子表格导入两个数据库。 我知道如何使用Docmd.transferspreadsheet将excel导入数据库I
am in,但是将excel电子表格导入另一个数据库的代码是什么样的? 任何帮助将不胜感激。
您好
您可以尝试使用以下命令打开不同的数据库,转移电子表格然后关闭它
DoCmd.OpenCurrentDatabasehttp://msdn.microsoft.com/en-us/library/office/ff837226.aspx
以上链接可能会有所帮助
干杯
I have two databases with various tables. I want a user to be able to go into one of the databases and import excel spreadsheets into both of the databases. I know how to use Docmd.transferspreadsheet to import the excel into the database I am in, but what would the code look like to import an excel spreadsheet into a different database? Any help would be appreciated.
Hi
Can you try using the following to open the different database, transfer the spreadsheet and then close it
DoCmd.OpenCurrentDatabasehttp://msdn.microsoft.com/en-us/library/office/ff837226.aspx
The above link might be helpful
Cheers
这篇关于将excel电子表格作为表从Access数据库而不是currentDB导入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!