且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将数据从SQL Server 2005导出到Excel

更新时间:2022-11-27 21:34:08

检查以下帖子


http:/ /support.microsoft.com/kb/306125


Hi,
My application is in VS2008 and coded in Vb.net.
I have my database in Sql Server 2005.I have a Database table say Table1 in My Database named Test.
Now i want to export the data in Table1 to a MS-Excel(.xls) file on the click of a button.
An excel file should be generated after the user clicks on the button and the generated Excel file should have the data that is present in Table1.
Can anyone provide me with a link or some helpful code to do this.
My code is in Vb.net
Thanks.

Check below thread

http://support.microsoft.com/kb/306125