insert into dbo.Monit_Node1(ThroCapacity,NetDelay,CPU_OccupRate,ChannCapacity,TrafDropped)
SELECT ThroCapacity,NetDelay,CPU_OccupRate,ChannCapacity,TrafDropped
FROM OPENDATASOURCE ('Microsoft.Jet.OLEDB.4.0',
'Data Source=d:\shuju.xls;Extended Properties=EXCEL 8.0' )...[Sheet1$] Rowset_1
最后一个参数需要加单引号,加上就好了
insert into dbo.Monit_Node1(ThroCapacity,NetDelay,CPU_OccupRate,ChannCapacity,TrafDropped)
select ThroCapacity,NetDelay,CPU_OccupRate,ChannCapacity,TrafDropped from openrowset('Microsoft.Jet.OLEDB.4.0','Excel 5.0;database=d:\shuju.xls;','select * from [sheet1$]');