how to bulk insert into excel?
-
Hello: Now i want to bulk insert a dataset into an excel file, is there any good method?Thanks in advance! :rose: Plus: i am wodering the method of firstly store the datatable in sql sever,then use dts. but i think it seems a little redundant and time-wasting.
-
Hello: Now i want to bulk insert a dataset into an excel file, is there any good method?Thanks in advance! :rose: Plus: i am wodering the method of firstly store the datatable in sql sever,then use dts. but i think it seems a little redundant and time-wasting.
I don't know how do it from TSQL but here is how I have done it form C++
CString str;
str.Format("SELECT * INTO [Excel 8.0;DATABASE=%s].[%s] FROM [%s]", ExcelFile, Worksheet, Table);// pConn is a database connection
pConn->Execute(str.AllocSysString(), NULL, adExecuteNoRecords);
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley: