开发者

unable to import excel 2007 to sql server using openrowset function

I want to import records in excel 2007 to sql server 2005 table. I used the query following query to select the reocrds.

select * 
FROM OPENROWSET ('Microsoft.ACE.OLEDB.12.0' ,'Excel 12.0;Database=d:\input.xlsx' ,
                 'SELECT * FROM [a$]' )

The开发者_如何转开发 query is running long time without any error or result. Then I convert the file to .xls format and used the following query.

select * 
FROM OPENROWSET ('Microsoft.JET.OLEDB.4.0' , 'Excel 8.0;Database=d:\input.xls' ,
                 'SELECT * FROM [a$]' )

It displayed the records.

But in most of the scenario, I should use .xlsx extension. Because the no. of records in a sheet may be huge.

Please help me.

Thanks, P.Gopalakrishnan


Go to ServerObjects Then LinedServers Then Providers If the name of the Provieder is not in the List then It will Give Error Of Provider.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜