use tablename
go
truncate table tablename
go
insert into table(x,x,x,x,x,x)
select x,x,x,x,x,x
from OpenDataSource('Microsoft.Ace.OLEDB.12.0','Data Source="xls文件路径";Extended Properties="Excel 12.0;HDR=YES"')...[Excel表名字+$]
go
use tablename
go
truncate table tablename
go
insert into table(x,x,x,x,x,x)
select x,x,x,x,x,x
from OpenDataSource('Microsoft.Ace.OLEDB.12.0','Data Source="xls文件路径";Extended Properties="Excel 12.0;HDR=YES"')...[Excel表名字+$]
go