optimization - Speeding Up C# App that opens multiple Excel files -


i wrote application c#. in app need open , close multiple excel files , read/write data to/from them, cause app runs slowly. method suggest speeding app ?

code sample write data excel file :

        excel.worksheet excelsheet = (worksheet)(excelbook.worksheets[1]);         range rng;          rng = excelsheet.get_range("c2");         rng.value2 = txtname.text; 

it's hard tell doing without more info. assuming doing 'something' excel files when open them might try turning off screen updating @ beginning of code.

application.screenupdating = false 

this can have profound impact on speed if moving lots of data between sheets or similar actions.

if leaving open user work turn on screen updating @ end of code.

application.screenupdating = true 

Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -