从网页选择SQL表并将其导出到Excel文件 [英] Select and export SQL table to Excel file from Web page

查看:84
本文介绍了从网页选择SQL表并将其导出到Excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

名为db的数据库有三个表,分别称为A,B,C,如何实现此效果:在下拉列表中,用户选择一个表(从DB中选择A,B,C)并单击一个按钮,然后导出该表的格式是Excel吗?(未在网页中显示表格,只需选择表格,单击按钮,然后导出表格)

我可以通过设置excel的数据源来手动操作它,但是我不知道如何通过编码来实现它?

The database named db have three tables called A,B,C,How to acheive this effect:in a dropdownlist user select one table(A,B,C from DB) and click a button ,than export the table which format is excel?(no showing the table in the web page,just select the table,click the button and that export the table)

I can operate it manually by set the excel''s datasource,but I don''t know how to acheive it by coding?

推荐答案

导出数据使用C#
从sql server中的表中Excel文件 使用SqlBulkCopy-ASP.NET将Excel数据导出到Sql Server中
使用C#和.NET的Excel查询工具
Schema From a DataSet, Exporting SQL Data to Excel, and More
Export Data To Excel file from a table in sql server using C#
Export Import Excel Data into Sql Server Using SqlBulkCopy-ASP.NET
Query Tool to Excel using C# and .NET



看看这篇文章:
无需从数据库自动将数据导出到Excel,Word,PDF [ ^ ]

希望对您有所帮助,
干杯

take a look at this post:
Export Data to Excel, Word, PDF without Automation from DataBase[^]

Hope it will help,
Cheers




检查以下链接:
将数据导出到Excel [
Hi,

Check following link :
Exporting Data to Excel[^]
hope it will help you:)


这篇关于从网页选择SQL表并将其导出到Excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆