I am using below code to delete multiple columns with range by using Excel Interop library. It is taking much time to delete the entire columns. Is there any other alternate ways to delete the multiple columns very quickly.
Код: Выделить всё
Excel.Application _excel = Globals.ThisAddIn.Application;
Excel.Workbook sourceWorkbook = _excel.ActiveWorkbook;
_excel.Application.ScreenUpdating = false;
_wb = _excel.Workbooks.Add(Type.Missing);
_wb.Activate();
_wb.Windows[1].Visible = true;
_wb.Application.ScreenUpdating = false;
_wb.Application.DisplayAlerts = false;
for (int i = 1; i
Источник: [url]https://stackoverflow.com/questions/78130883/net-excel-interop-multiple-columns-delete-with-range-very-slow[/url]