将数据从DataSet导出到文本文件或xls文件 [英] Exporting Data from DataSet to text file or xls file

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

问题描述

大家好,


有什么方法可以将数据从数据集表导出到文本文件或xls文件?


目前我通过遍历表格的每一行并将数据写入文件来实现这一点。我想避免迭代。我发现跳过迭代会改善性能。


请帮助..


谢谢!

Hi all,

Is there any way by which I can export the data from the dataset table to the text file or xls file ?

Currently I implemented this by itterating through each row of the table and writting the data to file.I want to avoid iteration.It occured to me bcoz skipping iteration will improve the performance.

Please Help..

Thanks!

推荐答案

你想要吗?将.xls文件保存在磁盘上或只是通过浏览器即时创建发送?

在第二种情况下,您只需设置页眉...

Do you want to save .xls file on disk or just to create-n-send through browser on-the-fly?
in second case, you just need to set page header...

展开 | 选择 | Wrap | 行号


@ ssnaik84


您好,


感谢您的回复。


但是我想将数据从数据集表导出/复制到文件。我希望将文件保存在本地磁盘上。


请提供输入。


谢谢!
@ssnaik84
Hi ,

Thanks for your reply.

But I want to export/copy data from dataset table to the file.The File I want to save it on local disk.

Please provide input.

Thanks!


你看过.WriteXML()函数吗?
Have you looked at the .WriteXML() function?


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

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