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

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

问题描述

这是将数据导出到一个现有的XLS表的最佳途径。 我需要支持的Excel的许多版本。 如果我是使用Visual Basic。我将使用CreateObject(Excel.application)code,将做什么,我需要。 什么是相当于在C#? 我很乐意为它工作在任何版本,如果可能的话还没有电脑的MS Office的。 请注意,花钱没有第三方组件。我们是穷人:)

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

推荐答案

使用C#编写到Excel中可以使用完成的 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天全站免登陆