我希望导出超过3万(数十万)记录,在.NET中有什么方法可以做到这一点吗? [英] I want export to excel more than 3 lakhs(hundred thousands) records, is there any othere way in .NET to do that?

查看:120
本文介绍了我希望导出超过3万(数十万)记录,在.NET中有什么方法可以做到这一点吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们,



在我的应用程序中,有出口超过3万卢比的情况。到目前为止,我通过以下链接做了。



将数据表导出到Excel,格式化为C# [ ^ ]





但它有很多时间来导出和打开excel文件。请分享您的想法是否有任何方法可以做到这一点。这对我来说非常紧急。



谢谢,

Ram。

解决方案

< blockquote>尝试使用字符串构建器

*将每个100条记录存储在字符串构建器中,然后导出100条记录响应对象

*每次响应写入后刷新内容


Dear Friends,

In my application there is situation to export to excel more than 3 lakhs records. so far I did through below link.

Export DataTable to Excel with Formatting in C#[^]


But it is getting lots of time to export and open that excel file. Please share your thoughts is there any way to do that. It is very urgent for me.

Thanks,
Ram.

解决方案

try to use string builder
* store each 100 record in the string builder then export the 100 record response object
* flush content after each response write


这篇关于我希望导出超过3万(数十万)记录,在.NET中有什么方法可以做到这一点吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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