C#导出到excel [英] C# export to excel

查看:92
本文介绍了C#导出到excel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

哪些是将数据导出到现有xls表格的最佳方式。
我需要支持许多版本的excel。
如果我使用Visual basic。我将使用CreateObject(Excel.application)代码,这将做我需要的。
什么是c#中的等价物?
我希望它可以在任何版本上工作,如果可能的话,还有没有ms办公室的电脑。
请不要花费钱的第三方组件。我们很穷:)。

Which is the best way to export data to an existing xls sheet. I needs to support many versions of excel. If i was using Visual basic. I would use the CreateObject("Excel.application") code which will do what i need. What is the equivalent in c#? I would love for it to work on any version, and if possible then also computers without ms office at all. Please no 3rd party components that cost money. we are poor :).

TY

推荐答案

写入Excel使用C#可以使用 Interop.Excel 完成这里是一个很棒的教程,屏幕截图可以帮助实现这一点。

Writing to Excel using C# can be accomplished using the Interop.Excel Here is a nice tutorial with screen shots to help make this happen.

http://csharp.net-informations.com/excel/ csharp-excel-tutorial.htm

这篇关于C#导出到excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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