如何将数据从SQL Server 2005导出到Excel [英] How to export data from SQL Server 2005 to Excel
问题描述
我的应用程序在VS2008中并在Vb.net中编码。
我在Sql Server 2005中有我的数据库。我有一个数据库表,在我的数据库中说Table1名为Test。
现在我想通过点击按钮将Table1中的数据导出到MS-Excel(.xls)文件。
用户单击按钮后应生成一个excel文件,生成的Excel文件应该包含Table1中的
数据。
任何人都可以为我提供链接或一些有用的代码来执行此操作。
我的代码在Vb.net
谢谢。
检查以下帖子
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
这篇关于如何将数据从SQL Server 2005导出到Excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!