如何将数据导出到Excel文件? [英] How can I export data to an Excel file

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

问题描述

我有一个带有数据的Excel文件。我想把一些特定的行写入我通过代码创建的另一个Excel文件。顺便说一下,我在列表中列出了这些行的索引。我如何做到这一点?

解决方案

MS提供OpenXML SDK V 2.5 - 参见 https://msdn.microsoft.com/en-us/library/bb448854(v = office。 15).aspx



这可以读+写MS Office文件(包括Excel)...



另一个选项请参阅 http://www.codeproject.com/KB/office/OpenXML .aspx



如果您需要更多的渲染,公式等,那么有不同的商业图书馆,如Aspose和Flexcel ...


I have an Excel file with data in it. I want to write some specific rows of it to another Excel file that I created by code. By the way I have the indexes of these rows in a list. How can i do that?

解决方案

MS provides the OpenXML SDK V 2.5 - see https://msdn.microsoft.com/en-us/library/bb448854(v=office.15).aspx

This can read+write MS Office files (including Excel)...

Another option see http://www.codeproject.com/KB/office/OpenXML.aspx

IF you need more like rendering, formulas etc. then there are different commercial libraries like Aspose and Flexcel...

这篇关于如何将数据导出到Excel文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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