Charles Williams Charles Williams - 1 year ago 88
Javascript Question

Excel-JS - Recalculate does not work

I cannot make Office-JS recalculate a workbook when in Manual mode: this code does not work

// calculate
context.workbook.application.calculate("Recalculate");
await context.sync();


But this code does

// calculate
context.workbook.application.calculate("Full");
await context.sync();


looks like a bug to me

Answer Source

After some more further review of the issue I agree that it was a bug. I have made the appropriate fix to our APIs and it will release in the coming weeks.

  • "Recalculate" will recalculate all dirty cells.
  • "Full" will mark all as dirty and recalculate.
  • "FullRebuild" will rebuild the calculation chain, mark all as dirty and recalculate.
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download