Question: how to export data from stored procedure to excel in sql server?
Answer: 1 Export data to existing EXCEL file from SQL Server table.
insert into OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=D:\testing.xls;',
'SELECT * FROM [SheetName$]') select* from SQLServerTable.
2 Export data from Excel to new SQL Server table.
select*