private void ExportDataTable(DataTableExporter exporter, Workbook book, WorkerThread thread) { //TudqThem if (modExport == 1 & columnRemove != null) { for (var j = 0; j < columnRemove.Rows.Count; j++) { for (var i = 0; i < ResultTable.Columns.Count; i++) { if (ResultTable.Columns[i].ColumnName == columnRemove.Rows[j]["Value"].ToString()) { ResultTable.Columns.RemoveAt(i); break; } } } } //End var sheet = book.Worksheets[book.Worksheets.Add()]; sheet.Name = string.Format(Language.SheetName, book.Worksheets.Count); thread.JobName = string.Format(Language.SaveToSheetStatus, book.Worksheets.Count); exporter.ExportDataTable(sheet, ResultTable); thread.JobName = string.Format(Language.ApplyFormatToSheetStatus, book.Worksheets.Count); sheet.AutoFitColumns(); }