从数据集到Excel的数据传输 [英] Data transfer from dataset to excel

查看:81
本文介绍了从数据集到Excel的数据传输的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 2005 / vb中的项目。

I am working on a project in Visual studio 2005 / vb.

我在数据网格中显示了一些记录,这些记录绑定到对象(类)数据源。我需要将所有这些数据传输到excel。有一个简单的方法吗?

I have some records displayed in a datagrid which is bound to an object (class) data source. I need to transfer all this data to excel. Is there a simple way to do this???

推荐答案

以编程方式还是手动方式?手动,使用Ctrl + A选择网格中的所有数据。然后粘贴到Excel中。以编程方式,没有一种方法特别简单。您必须使用Excel Interop,或者将Excel工作簿作为OleDb数据库打开。这些论坛中的两种方法都有很多线程。尝试搜索它们。
Programmatically or manually? Manually, select all of the data in the grid using Ctrl+A. Then paste into Excel. Programatically, none of the ways are particularly simple. You have to either use Excel Interop, or open the Excel workbook as an OleDb database. There are many threads on both methods in these forums. Try searching for them.


这篇关于从数据集到Excel的数据传输的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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