如何使用C#从Sql数据库生成Excel [英] How Do I Generate Excel From Sql Database Using C#

查看:114
本文介绍了如何使用C#从Sql数据库生成Excel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的团队,



我想使用c#从sql数据库生成excel,但我想从Sql中获取不同的列标题。



喜欢管理信息系统。



请帮助

Dear Team,

I Want to Generate excel from sql database using c# but i want different column header from Sql.

like Management Information System.

Pls help

推荐答案

使用此组件它有样本: http://epplus.codeplex.com/ [ ^ ]
Use this component and it has samples : http://epplus.codeplex.com/[^]


更改SQL查询中的列名。



SELECT somecolumn AS newname ...
Alter the column names in the SQL query.

SELECT somecolumn AS newname ...


这篇关于如何使用C#从Sql数据库生成Excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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