使用VBA在Access中查询Excel [英] Query Excel in Access using VBA

查看:165
本文介绍了使用VBA在Access中查询Excel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道使用VBA在Access中查询Excel的最佳方法是什么,而不将Excel导入Access

I wonder what is the best way to query an Excel against a table in Access using VBA without importing the Excel into Access

基本上,我只需要Excel中的几列。如果我确实需要将Excel导入Access,我想只导入我需要的那些列,因为我想最小化数据库的大小。

Basically, I only need a few columns from Excel. And if I do need to import the Excel into Access, I would like to import only those columns that I need as I want to minimize the size of the DB.

请提供建议。非常感谢您的帮助!

Please advice. Your help would be greatly appreciated!

推荐答案

您可以在您的Excel工作表中创建链接访问数据库。

然后使用基于链接的Excel表的生成表查询来创建只包含所需字段的表。

Then use a make-table query based on the linked Excel table to create a table with only the fields you need.


这篇关于使用VBA在Access中查询Excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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