sql sever 读取excel、csv文件

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$]')

你可能感兴趣的:(sql sever 读取excel、csv文件)