Click here to Skip to main content
15,891,939 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello,

Is there a way to have the SQL results be exported to MS Excel Automatically?

Normaly, we execute the SQL command and once the results are display we right click on the result set and select either Copy or Copy with Headers and paste it on MS Excel.

Thanks in advance
Posted
Comments
PIEBALDconsult 29-Oct-14 11:54am    
SSIS?
mahdear 29-Oct-14 13:14pm    
its more on SSMS.. will SSIS create a CSV or XLX file when I run the SQL code?
PIEBALDconsult 29-Oct-14 16:27pm    
If that's what you tell it to do.

 
Share this answer
 
Comments
Maciej Los 29-Oct-14 13:10pm    
+5
Peter Leow 29-Oct-14 21:54pm    
Thank you, Maciej.
Alternativelly...

You can connect to SQL database using MS Excel functionality. Please, have a look here: Excel: Connect to (import) SQL Server data[^]
 
Share this answer
 
Comments
Peter Leow 29-Oct-14 20:44pm    
5ed!
Maciej Los 30-Oct-14 2:48am    
Thank you, Peter ;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900