在C#Windows应用程序中的Excel导出过程中的进度栏 [英] Progress Bar during excel export in c# windows application

查看:332
本文介绍了在C#Windows应用程序中的Excel导出过程中的进度栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我将datagridview的内容导出到excel文件中,由于没有记录,这花费了很多时间,我想到了在文件开始上传时显示一次进度条,而在文件上传完成时显示一次进度条.是否只能使用计时器或文件长度是否足够?谁能帮我.

如果在部分中写入文件流,则在Advance

Hi,

I am export the contents of datagridview to excel file and it take quite lot time due to the no of records, I thought of displaying a progress bar starting once when file starts uploading and end once when the file upload completes. Is it possible only with the timer or the file length is enough. Can anyone kindly assist me.

Thanks in Advance

推荐答案

文件长度就足够了.
将每个部分设置为1024个字节,对各个部分求和并按流长度指定
file length is enough if you write the filestream in parts.
Set each part to 1024 bytes, sum the parts and devide by streamlength


尝试这些链接
c#中的进度条
进度栏
try these links
Progress bar in c#
Progress bar


这篇关于在C#Windows应用程序中的Excel导出过程中的进度栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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