且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将数据从excel导入到SQL Server更新或实时流数据

更新时间:2023-10-15 11:26:46

要将Excel数据导入SQL数据库,您必须使用提供程序(或)驱动程序。 br />


更好的是你可以使用OLEDB提供商来实现这个目标..



通过这个链接实现你的目标..



http://support.microsoft.com/kb/ 321686 [ ^ ]

http://www.66pacific.com/sql_server_import_from_excel.aspx [ ^ ]



据我所知,你可以实现这一点以多种方式......

1)首先,您为OLEDB提供商创建连接,然后您可以将Excel数据上传到GV。

2)你在DataSet中有一个数据,所以使用GetXML()方法你应该将DataSet数据转换成XML数据,在你的SP中明智地做插入数据的循环条件..
$ b使用该数据集的$ b(或)

,在页面方面,您可以使用foreach条件来编写插入查询以插入数据。
For import Excel Data to SQL DataBase you must be use providers (or) drivers.

Better you can use OLEDB provider to achieve this ..

Go through this links to achieve your goal..

http://support.microsoft.com/kb/321686[^]
http://www.66pacific.com/sql_server_import_from_excel.aspx[^]

As per my knowledge you can achieve this in several way''s...
1) first of all you create the connection for OLEDB provider, then you can upload the excel data into GV.
2) you have a data in your DataSet, so using GetXML() method you should convert DataSet data into XML data , in your SP wise do the looping conditon for inserting data..
(or)
using that dataset , in page wise you can use foreach condition inside of that you write the insertion query for inserting the data.