如何读取Excel并将数据存储在数据库中 [英] how to read excel and store the data in database

查看:102
本文介绍了如何读取Excel并将数据存储在数据库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,

我想将数据从excel保存到数据库,并将数据从datagrid导出到excel.请帮帮我

谢谢和问候,
mvengaqu

Dear all,

I want to save the data from excel to the database and export data from datagrid to excel. Please help me out

Thanks and regards,
mvengaqu

推荐答案

要从excel读取数据,请 ^ ]文章可能对您有用.

要导出数据,可以通过使用VB.Net导出到Excel [
To read data from excel, this[^] article could be useful to you.

To export data, you can go through Export to Excel using VB.Net[^].


用于导入数据从excel精通OPENROWSET命令将帮助您:
http://support.microsoft.com/kb/321686 [ http://jasonhaley.com/blog/post/2004/03/06/OPENROWSET-T-SQL-function.aspx [ ^ ]

www.sqlservercentral.com/Forums/Topic496226-148-1.aspx [ ^ ]

当然,数据网格没有自己的数据,它们已链接到您应该使用的数据源.因此要将数据源中的数据转储到excel电子表格中,请阅读以下页面:
http://www.dotnetperls.com/excel-vbnet [ http://stackoverflow.com/questions/3096090/最快的方式来写单元格到与Office互操作的excel [
For importing data from an excel fine the OPENROWSET command will help you :
http://support.microsoft.com/kb/321686[^]

http://jasonhaley.com/blog/post/2004/03/06/OPENROWSET-T-SQL-function.aspx[^]

www.sqlservercentral.com/Forums/Topic496226-148-1.aspx[^]

Of course datagrids don''t have data by their own and they are linked to a datasource that you should work with them. so to dump data in a datasource into an excel spreadsheet read these pages :
http://www.dotnetperls.com/excel-vbnet[^]

http://stackoverflow.com/questions/3096090/fastest-way-to-write-cells-to-excel-with-office-interop[^]

Hope it helps.


这篇关于如何读取Excel并将数据存储在数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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