Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Export data from SQL Server into a new Excel file

Author  Topic 

tiju_thomas
Starting Member

1 Post

Posted - 2009-05-25 : 06:35:50
Hi Friends,
Can any one please help me with the code in C# to export data from a table having 5 columns in Microsoft SQL Server into a new Microsoft Excel file(i.e the excel file should be created and saved at the run time, not to be exported to an existing excel file).
Thanks and Regards,
Tiju.

bklr
Master Smack Fu Yak Hacker

1693 Posts

Posted - 2009-06-10 : 05:23:41
in sqlserver use go to query -->results to --> select results to file (ctrl+shift+F)
run the select qurey and save the file with (required extension like .xls,.txt...)
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-06-10 : 08:51:26
Point 5
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -