c# - 在 Excel 中发生缓慢计算时,如何让计算百分比显示在我的 WinForm 中?
问题描述
我有一个 WinForms 应用程序,它在后台执行一些 excel 工作。如随附的屏幕截图所示,Excel 显示了大型计算的计算完成百分比。
我希望能够访问此实时百分比以显示在我的表单上,如下所示:
...
// Method to update my status label on the form
UpdateStatus("Starting heavy calculation . . .");
// The heavy calculation I'm sending to Excel
Range rngEBOMTotals = sheetMathResults.Range["D2"];
rngEBOMTotals.Formula = "=SUMIF(PLM_EBOM!G:G,Results!A2,PLM_EBOM!O:O)";
sheetMathResults.Range["D2:D" + endRange.End(XlDirection.xlUp).Row].FillDown();
// I would like to access the Percentage complete from Excel and show it in my status label.
UpdateStatus( /* Code to get the percent complete */ );
...
这是可能的还是可行的?
是否有更简单的解决方案来获取我缺少的计算状态?
我的研究没有运气。
解决方案
推荐阅读
- google-cloud-platform - 谷歌云平台负载均衡器 - ERR_TOO_MANY_REDIRECTS
- javascript - 使用 maxDate 的 bootstrap-datetimepicker 有时不显示日期
- flutter - 在内部存储器(根文件夹)中创建目录 Flutter
- python - 如何使用 Python 将具有非英文字符的变量打印到命令提示符
- javascript - 在反应 js 中使用 OOP
- javascript - 如何基于对象数组中的相似值(不是属性)对对象数组执行加/减运算
- javascript - 如何在deck gl中的鼠标拖动上绘制3D长方体?
- python - 使用python的交互式通知windows 10
- java - Maven Archetype 项目存储库问题
- python - 字典值的规范化