使用Office 2007中的代码在MSAccess中导入Excel数据 [英] Importing Excel data in MSAccess using code in Office 2007

查看:92
本文介绍了使用Office 2007中的代码在MSAccess中导入Excel数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两列excel表格,我想将这些数据导入到Access数据库中,但是我想通过代码来实现,我不知道该怎么做.

我想创建访问数据库表,并通过代码将数据从excel工作表导入到此表.

谢谢

I have an excel sheet of two columns and I want to import these data into an access database but I want to do that by code and I do not know how can I do that.

I want to create access database table and import the data from the excel sheet to this table via code.

Thanks

推荐答案

您可以通过OleDB从Excel中读取,然后将该数据写入Access(同样通过OleDB). Google for OleDB/ADO.NET教程,您会发现数十或数百篇有关该主题的文章.
You can read from Excel via OleDB and then write that data into Access (again via OleDB). Google for OleDB/ADO.NET tutorials and you will find dozens or perhaps 100s of articles on the topic.


就像Nish指出的那样,那里有很多文章.像 [一个 [
Like Nish pointed out there are tonnes of articles out there. Go get them, like this [^] one and this one[^]


如何使用vb.net将Excel中的批量数据插入sql
how to insert bulk data from excel into sql using vb.net


这篇关于使用Office 2007中的代码在MSAccess中导入Excel数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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