将excel电子表格作为表从Access数据库而不是currentDB导入 [英] Import an excel spreadsheet as a table from an access database not the currentDB

查看:153
本文介绍了将excel电子表格作为表从Access数据库而不是currentDB导入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个包含各种表格的数据库。 我希望用户能够进入其中一个数据库并将excel电子表格导入两个数据库。 我知道如何使用Docmd.transferspreadsheet将excel导入数据库I
am in,但是将excel电子表格导入另一个数据库的代码是什么样的? 任何帮助将不胜感激。

解决方案

您好


您可以尝试使用以下命令打开不同的数据库,转移电子表格然后关闭它

 DoCmd.OpenCurrentDatabase 

http://msdn.microsoft.com/en-us/library/office/ff837226.aspx


以上链接可能会有所帮助


干杯


Shasur


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.OpenCurrentDatabase

http://msdn.microsoft.com/en-us/library/office/ff837226.aspx

The above link might be helpful

Cheers

Shasur


这篇关于将excel电子表格作为表从Access数据库而不是currentDB导入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆