private void PrintBody(Application application, ShopRequestViewDataTable shopRequestTable, out int currentExcelRow) { currentExcelRow = 2; foreach (ShopRequestViewRow row in shopRequestTable.Rows) { PrintShopRequest(application, ref currentExcelRow, row); } }
private void BuildReport(ShopRequestViewDataTable shopRequestTable) { int currentExcelRow; Excel.Application application = new Excel.Application(); application.SheetsInNewWorkbook = 1; //Количество листов в книге application.Workbooks.Add(Type.Missing); //Добавление новой книги PrintHeader(application); PrintBody(application, shopRequestTable, out currentExcelRow); FormatTable(application, currentExcelRow); application.Visible = true;//Отображение приложения }
public Task Report(ShopRequestViewDataTable shopRequestTable) { return(Task.Run(() => BuildReport(shopRequestTable))); }