Exporting stored procedure result to excel with column name
我查看了上面的链接并创建了存储过程。我没有将数据放入我在D:\testing.xls和D:\data_file.xls中创建的ExcelSheet中
Errors List
1.usage: bcp {dbtable | query} {in | out | queryout | format} datafile
  [-m maxerrors]            [-f formatfile]          [-e errfile]
  [-F firstrow]             [-L lastrow]             [-b batchsize]
  [-n native type]          [-c character type]      [-w wide character type]
  [-N keep non-text native] [-V file format version] [-q quoted identifier]
  [-C code page specifier]  [-t field terminator]    [-r row terminator]
  [-i inputfile]            [-o outfile]             [-a packetsize]
  [-S server name]          [-U username]            [-P password]
  [-T trusted connection]   [-v version]             [-R regional enable]
  [-k keep null values]     [-E keep identity values]
  [-h "load hints"]
NULL
2.The system cannot find the file specified.
NULL
3.Could Not Find D:\data_file.xls
NULL发布于 2011-11-28 18:38:55
下面的脚本可能会对你有用。
INSERT INTO OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0','Data Source={\\Operations\Output\CR_20071130.xls};Extended Properties=Excel 8.0')..
[Sheet1$A1:H1] exec YourStoredProcedurehttps://stackoverflow.com/questions/8060236
复制相似问题