用C#应用程序创建Excel文件的最佳方法是什么 [英] What is the best way to create excel file with C# app

查看:74
本文介绍了用C#应用程序创建Excel文件的最佳方法是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请告诉我从c#应用程序创建或填充excel文件的最佳方法
或对此有任何组成部分
请帮助,这对我来说非常重要.
我需要详细的教程

Please advice me best way to create or fill excel files from c# application
or is there any component for this
please help this is very important for me.
i need detail tutorial

推荐答案


这取决于您要确切执行的操作.
一种方法是在您的App中使用Office组件. (this)

另一个是创建csv文件. (尽管CSV文件不是Excel文件,但是Excel可以打开和编辑它们).因此,当您只想编写一些数据并以excel格式查看它们时,这会很好.
另一种方法是使用SQL Server.

最后一种方法是使用Ado.Net

希望那些可以帮助您.

Hi,
It depends on what you want to do exactly.
One way is to use office components in you App. (this)

Another one is to create csv files. (Although CSV files are not Excel files but Excel can open and edit them). So it is good when you just want to write some data and view them formatted in excel.
Another way could be using SQL Server. this

And the last way is using Ado.Net this

Hope those can help you.


您好;它取决于您要将数据导出到excel的位置,例如,如果您具有datagridview,则可以通过本文链接 [ ^ ]

问候.
hello; It depends from where you want to export your data to excel for example if you have a datagridview so you can you this article link[^]

regards..


我已经使用了互操作性方法和oledb方法,而Office组件则稍慢一些.
I have used the interoperability approach and oledb approach, and office components was little bit slower.


这篇关于用C#应用程序创建Excel文件的最佳方法是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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