使用vb.net将多个Excel工作表导出到Access中 [英] Export multiple excel sheets into Access using vb.net

查看:94
本文介绍了使用vb.net将多个Excel工作表导出到Access中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在谷歌搜索了一个星期,但没弄明白。



这是一个场景。



我有多个工作表,因为少数几个列存在于几个工作表中。我想合并所有工作表并使用vb.net或C#导出到单一访问表。



到目前为止,下面的代码适用于单个工作表。



I have searching this in Google for a week, not able to figure out.

Here is the scenario.

I have multiple worksheets, in that few columns exist in few sheets. I would like to merge all worksheets and export into single access table using vb.net or C#.

So far, below code works perfectly for single worksheet.

_command.CommandText = "SELECT * INTO [" & dbpath & "].[Sheet1] FROM [Sheet1$]"





1.对我来说,床单不详,上面有一张纸。

2.几张纸上几列很少,如sheet1中的Firstname,sheet4 ......等等。所以我需要在Firstname下添加两个数据。



任何想法。



1. For me Sheets are unknown, above works for one sheets.
2. Few columns existed in few sheets, like Firstname in sheet1, sheet4 ... etc. So that case i need to add both data under Firstname.

Any ideas.

推荐答案





1.对我来说,床单不详,上面有一张。

2.很少列中存在少量列,如sheet1中的Firstname,sheet4 ......等等。所以我需要在Firstname下添加两个数据。



任何想法。



1. For me Sheets are unknown, above works for one sheets.
2. Few columns existed in few sheets, like Firstname in sheet1, sheet4 ... etc. So that case i need to add both data under Firstname.

Any ideas.


http://www.sattsoft.com/tutorials/contents/1/19/step-by-step-tutorial-on-how -to-import-export-data-to-excel-using-vb-net.html [ ^ ]


这篇关于使用vb.net将多个Excel工作表导出到Access中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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