delaying excel calculations during interop C#
Asked Answered
B

1

7

I have to input several hundred cells into an excel sheet from a C# program. Each time I set a cell or a range, excel slowly responds... presumably updating various outputs between each input I add. Is there a way to disable calculations from my C# program, and re-enable it after I am done setting cells and ready to read the outputs?

Brilliant answered 23/11, 2010 at 18:58 Comment(0)
D
20

Yes, set the Application.Calculation to xlCalculationManual, then back to xlCalculationAutomatic.

You can also consider setting Application.ScreenUpdating to false and then back to true.

Different answered 23/11, 2010 at 19:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.