如何将数据从C#中的列表框传输到Excel工作表 [英] How do I transfer data from a listbox in C# to an excel sheet

查看:88
本文介绍了如何将数据从C#中的列表框传输到Excel工作表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用C#编写程序,需要将存储在列表框中的一些数据传输到excel文件中。请有人帮我使用C#中的代码,我可以使用它将数据传输到excel。

I am writing a program in C# and need to transfer some of my data which are stored in a listbox to an excel file. Please can someone help me with a code in C# which I can use to transfer the data to excel.

推荐答案

这里有几篇关于如何使用本网站的文章使用Excel。您需要做的就是了解如何写入Excel,然后很容易从列表框中取出您的值并放入Excel。



例如:

不使用Microsoft Excel生成Excel文件 [ ^ ]



从DataSet快速导出到Excel [ ^ ]
Here are a couple of articles on this site of how to work with Excel. All you need to do is understand how to write to excel and then it's easy to take your values from the listbox and put into Excel.

For example:
Generate Excel files without using Microsoft Excel[^]
and
Fast Exporting from DataSet to Excel[^]


这篇关于如何将数据从C#中的列表框传输到Excel工作表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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