I have a WinForms application that does some excel work in the background. As shown in the attached screenshot, Excel shows the calculation completion percentage for large calculations.
I would like to be able to access this live percentage to display on my form like this:
...
// 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 */ );
...
Is this possible or practical?
Is there a simpler solution to get the status of a calculation that I'm missing?
I've had no luck in my research.
