Example #1
0
        public void Genereted_PCRaport()
        {
            System.Data.DataTable ActionList = new System.Data.DataTable();
            System.Data.DataTable NewActionPozitive;
            System.Data.DataTable NewActionNegative;
            System.Data.DataTable NewActionPozitiveFinish;
            System.Data.DataTable NewActionNegativeFinish;
            string    Link;
            Worksheet worksheet;


            Link = data_Import.Load_Link("Action");
            data_Import.Load_TxtToDataTable(ref ActionList, Link);

            NewActionPozitive = Load_Table(ActionList, "2019", "Pozytywna");
            NewActionNegative = Load_Table(ActionList, "2019", "Negatywna");

            NewActionPozitiveFinish = Prepare_Table(NewActionPozitive);
            NewActionNegativeFinish = Prepare_Table(NewActionNegative);

            Microsoft.Office.Interop.Excel.Application excel;
            Workbook workbook;

            Create_Excel_Application Application = new Create_Excel_Application();

            excel = Application.Create_Application();

            Create_Excel_WorkBooks Workbooks = new Create_Excel_WorkBooks();

            workbook = Workbooks.Create_WorkBooks(excel);

            Create_Excel_WorkSheet Excel_worksheet = new Create_Excel_WorkSheet();

            worksheet = Excel_worksheet.Create_WorkSheet(workbook, "DM 2019");
            worksheet.Application.ActiveWindow.Zoom = 85;


            Action_WorkSheet(worksheet, NewActionPozitiveFinish, 10);
            Action_WorkSheet(worksheet, NewActionNegativeFinish, 14 + NewActionPozitiveFinish.Rows.Count);

            Save_Excel_WorkBook Save = new Save_Excel_WorkBook();

            Save.Save_WorkBook(excel, workbook);
        }
Example #2
0
        public void Genereted_Level1()
        {
            Microsoft.Office.Interop.Excel.Application excel;
            Workbook workbook;
            decimal  YearGenereted;

            YearGenereted = ((NumericUpDown)mainProgram.TabControl.Controls.Find("num_SummaryDetailYear", true).First()).Value;

            Create_Excel_Application Application = new Create_Excel_Application();

            excel = Application.Create_Application();

            Create_Excel_WorkBooks Workbooks = new Create_Excel_WorkBooks();

            workbook = Workbooks.Create_WorkBooks(excel);

            Sum(workbook, YearGenereted);
            Remove_Empty_Sheets(excel, workbook);

            Save_Excel_WorkBook Save = new Save_Excel_WorkBook();

            Save.Save_WorkBook(excel, workbook);
        }