Question: how to export data from sql server 2012 to excel using stored procedure?
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*