将数据从EXCEL工作表导入到SQL Server 2005
问题描述:
你好,
我想将数据从excel工作表导入到sql server数据库中.
Hello,
I want to import data from excel sheet to sql server database.
答
您可以使用 ^ ]
在T-SQL中使用OpenRowset函数,如下所示:
Use the OpenRowset function in T-SQL, like this:
select * from OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\myfile.xls', 'select * from [Sheet1
')