本文介绍了如何将数据从Excel工作表导入到SQL Server 2005的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
先生,
我想将数据从Excel工作表导入sql server 2005
plz,rply
感谢advnc
sir,
i want to import datafrom excel sheet to sql server 2005
plz, rply
thanks in advnc
推荐答案
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1";
如果不起作用,您可以从以下网站搜索其他人:http://www.connectionstrings.com/excel
然后,对于数据访问查询,表名将是带有"
If it dont work, u can search others from: http://www.connectionstrings.com/excel
Then for data access query, thhe table name will be the sheet name with ''
select * from [Sheet1
您可以使用您的数据访问方法(例如OledbConnection和OledbCommand)将数据读入DataTable.之后,使用ur方法,您可以将其插入sql server数据库. :)
U can read data by using your data access method (e.g. OledbConnection and OledbCommand) into DataTable. After that, using ur method, u can insert into sql server database. :)
这篇关于如何将数据从Excel工作表导入到SQL Server 2005的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!