EXCEL导出到数据库3种方法

1.insert into tem SELECT *
FROM OpenDataSource('Microsoft.Jet.OLEDB.4.0','Data Source="c:\1.xls";User ID=Admin;Password=;Extended properties=Excel 8.0')...[Sheet1$]



2.EXEC master..xp_cmdshell 'bcp evaluate.dbo.course out c:\Book1.xls -c -q -S"(local)" -U"sa" -P"123"' 



3.
insert into course (cno,cname,tno,credit,ctime,ckind,cnorm)SELECT * FROM OpenDataSource('Microsoft.Jet.OLEDB.4.0','Data Source="F:\1.xls";User ID=Admin;Password=;Extended properties=Excel 8.0')...[Sheet1$] 

你可能感兴趣的:(数据库,数据库,properties,excel,c)