VSTO Excel Control Performance

I was creating a ComboBox in an Excel  spreadsheet, however when loading the spreadsheet from a file and creating dynamically the ComboBox was really slow.

Two things were added to increase performance:

  • When the file load starts the following command was added Globals.ThisAddIn.Application.ScreenUpdating = false; and when the load finishes the opposite Globals.ThisAddIn.Application.ScreenUpdating = true;
  • Creating the ComboBox I was adding its items one by one, instead the DataSource property of the ComboBox was used.
  • Still slow but it changed.

    Leave a Comment