在SQL SERVER里往Excel插入数据:
insert into OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="c:\Temp.xls";User ID=Admin;Password=;Extended properties=Excel 5.0')...table1 (A1,A2,A3) values (1,2,3)
T-SQL代码:
INSERT INTO
OPENDATASOURCE('Microsoft.JET.OLEDB.4.0',
'Extended Properties=Excel 8.0;Data source=C:\training\inventur.xls')...[Filiale1$]
(bestand, produkt) VALUES (20, 'Test')
参考:
http://zhidao.baidu.com/link?url=CM9jOXmrtwRPZDTQr7ddV7bwKGe6uSOhSVOr7yM_pcygPzBFFTMKG6X1LKtxgdaBogJC_BgJC4MeiUB9SP76q_