Recalculating Worksheets on Save Problem

Feb 26, 2015 at 3:58 PM
Edited Feb 26, 2015 at 4:28 PM
I am having problems getting the Calculate() function to work in EEPlus.

Basically, I have an Excel file with multiple worksheets ... Sheet1 has the data, and Sheet2 is a summary page with the formulas and calculations.

After populating the data in Sheet1 with EEPlus, I am trying to trigger the formulas on Sheet2 to recalculate before I save, but nothing is happening. This is the code I am using to calculate.
                pck.Workbook.CalcMode = ExcelCalcMode.Automatic;
                var ExcelWS2 = pck.Workbook.Worksheets["Summary"];
                ExcelWS2.Calculate();
I tried to trigger the Calculate function on the workbook, but it hangs ... example:
                pck.Workbook.Calculate();
I really am stumped ... any help would be appreciated.