将数据从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?