sql sever 读取excel、csv文件

2017-01-17  本文已影响119人  Eric_Zeng

https://msdn.microsoft.com/en-us/library/ms188365.aspx

读取csv

select * from OPENQUERY(DGKF,'select * from [test.csv]')---DGKF是路径

读取excel

select * from OpenRowSet('Microsoft.ACE.OLEDB.12.0',

'Excel 12.0;HDR=Yes;IMEX=1;Database=D:\test.xlsx',

'select * from [Sheet1$]')

上一篇下一篇

猜你喜欢

热点阅读