コード例 #1
0
        private void PrintBody(Application application, ShopRequestViewDataTable shopRequestTable, out int currentExcelRow)
        {
            currentExcelRow = 2;

            foreach (ShopRequestViewRow row in shopRequestTable.Rows)
            {
                PrintShopRequest(application, ref currentExcelRow, row);
            }
        }
コード例 #2
0
        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;//Отображение приложения
        }
コード例 #3
0
 public Task Report(ShopRequestViewDataTable shopRequestTable)
 {
     return(Task.Run(() => BuildReport(shopRequestTable)));
 }