/// <summary>
        /// Extrae los datos para generar el Excel
        /// </summary>
        private void createExcel()
        {
            string pcc = string.Empty;

            pcc = txtPCC.Text;
            List <ProductivityRankingPerPCC> listProductivity = null;

            count = 5;
            Microsoft.VisualBasic.Devices.Computer MyComputer = new Microsoft.VisualBasic.Devices.Computer();
            string fileName = string.Empty; //Environment.GetFolderPath(Environment.SpecialFolder.InternetCache);

            #region ===== Generating Excel Document ======

            using (Components.MyCTSExcel MyCTSExcel = new Components.MyCTSExcel())
            {
                if (rdoWeek.Checked)
                {
                    listProductivity = ProductivityRankingPerPCCBL.GetProductivityRankingPerPCC(1, week, pcc);
                    MyCTSExcel.CreateExcelObject("MyCTSProductividadSemanal");
                }
                else if (rdoMonth.Checked)
                {
                    listProductivity = ProductivityRankingPerPCCBL.GetProductivityRankingPerPCC(2, month, pcc);
                    MyCTSExcel.CreateExcelObject("MyCTSProductividadMensual");
                }
                else
                {
                    string   acumulative;
                    DateTime today = new DateTime();
                    today            = DateTime.Now;
                    acumulative      = Convert.ToString(today);
                    acumulative      = acumulative.Substring(0, 10);
                    listProductivity = ProductivityRankingPerPCCBL.GetProductivityRankingPerPCC(3, "02-02-2010", pcc);
                    MyCTSExcel.CreateExcelObject("MyCTSProductividadAcumulativa");
                }
                if (listProductivity.Count > 0)
                {
                    if (MyCTSExcel.IsObjectCreated)
                    {
                        MyCTSExcel.Cell cell = null;
                        fileName = MyComputer.FileSystem.SpecialDirectories.Temp;
                        fileName = fileName + string.Format("\\TempFile_{0}.xls", Guid.NewGuid().ToString());

                        #region ===== Headers ======

                        date = string.Concat(date, "Del  ", listProductivity[0].InitialDate, "  Al  ", listProductivity[0].FinalDate);

                        cell            = new MyCTSExcel.Cell(1, 5, "REPORTE DE PRODUCTIVIDAD POR PCC DE RESERVACIONES HECHAS EN MyCTS");
                        cell.Bold       = true;
                        cell.Wide       = 7;
                        cell.FontSize   = 11;
                        cell.ShowBorder = false;
                        MyCTSExcel.CreateCell(cell);

                        cell            = new MyCTSExcel.Cell(2, 7, date);
                        cell.FontColor  = Color.Blue;
                        cell.Wide       = 4;
                        cell.ShowBorder = false;
                        MyCTSExcel.CreateCell(cell);

                        cell            = new MyCTSExcel.Cell(2, 2, "PCC " + txtPCC.Text.Trim());
                        cell.FontColor  = Color.Blue;
                        cell.ShowBorder = false;
                        MyCTSExcel.CreateCell(cell);

                        cell = new MyCTSExcel.Cell(3, 3, "%Productividad Vs" + "\n" +
                                                   "PCC" + "\n" + "Segmentos");
                        cell.FontColor  = Color.Blue;
                        cell.Bold       = true;
                        cell.ShowBorder = false;
                        cell.Wide       = 2;
                        cell.Alignment  = MyCTSExcel.Alignment.MiddleCenter;
                        MyCTSExcel.CreateCell(cell);

                        cell = new MyCTSExcel.Cell(3, 7, "%Productividad Vs" + "\n" +
                                                   "PCC" + "\n" + "Records");
                        cell.FontColor  = Color.Blue;
                        cell.Bold       = true;
                        cell.Wide       = 2;
                        cell.ShowBorder = false;
                        cell.Alignment  = MyCTSExcel.Alignment.MiddleCenter;
                        MyCTSExcel.CreateCell(cell);

                        cell = new MyCTSExcel.Cell(3, 11, "%Productividad Vs" + "\n" +
                                                   "PCC" + "\n" + "Boletos");
                        cell.FontColor  = Color.Blue;
                        cell.Bold       = true;
                        cell.Wide       = 1;
                        cell.ShowBorder = false;
                        cell.Alignment  = MyCTSExcel.Alignment.MiddleCenter;
                        MyCTSExcel.CreateCell(cell);

                        cell            = new MyCTSExcel.Cell(3, 14, "Efectividad");
                        cell.FontColor  = Color.Blue;
                        cell.Bold       = true;
                        cell.ShowBorder = false;
                        cell.Alignment  = MyCTSExcel.Alignment.MiddleCenter;
                        MyCTSExcel.CreateCell(cell);

                        cell           = new MyCTSExcel.Cell(4, 1, "Agente");
                        cell.FontColor = Color.Brown;
                        MyCTSExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(4, 2, "Nombre");
                        cell.FontColor = Color.Brown;
                        MyCTSExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(4, 3, "Aereos");
                        cell.FontColor = Color.Brown;
                        MyCTSExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(4, 4, "Hotel");
                        cell.FontColor = Color.Brown;
                        MyCTSExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(4, 5, "Auto");
                        cell.FontColor = Color.Brown;
                        MyCTSExcel.CreateCell(cell);

                        cell           = new MyCTSExcel.Cell(4, 7, "Creados");
                        cell.FontColor = Color.Brown;
                        MyCTSExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(4, 8, "Cancelados");
                        cell.FontColor = Color.Brown;
                        MyCTSExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(4, 9, "Scans Promedio");
                        cell.FontColor = Color.Brown;
                        MyCTSExcel.CreateCell(cell);

                        cell           = new MyCTSExcel.Cell(4, 11, "Emitidos");
                        cell.FontColor = Color.Brown;
                        MyCTSExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(4, 12, "Cancelados");
                        cell.FontColor = Color.Brown;
                        MyCTSExcel.CreateCell(cell);

                        cell           = new MyCTSExcel.Cell(4, 14, "Records Vs Boletos");
                        cell.FontColor = Color.Brown;
                        MyCTSExcel.CreateCell(cell);


                        #endregion

                        #region ====== Elements =====

                        foreach (ProductivityRankingPerPCC p in listProductivity)
                        {
                            cell = new MyCTSExcel.Cell(count, 1, p.Agent);
                            MyCTSExcel.CreateCell(cell);
                            cell = new MyCTSExcel.Cell(count, 2, p.FamilyName);
                            MyCTSExcel.CreateCell(cell);

                            //Segmentos
                            cell = new MyCTSExcel.Cell(count, 3, Convert.ToString(p.AirProductivity + "%"));
                            MyCTSExcel.CreateCell(cell);
                            cell = new MyCTSExcel.Cell(count, 4, Convert.ToString(p.HotelProductivity + "%"));
                            MyCTSExcel.CreateCell(cell);
                            cell = new MyCTSExcel.Cell(count, 5, Convert.ToString(p.AutoProductivity + "%"));
                            MyCTSExcel.CreateCell(cell);

                            //Records
                            cell = new MyCTSExcel.Cell(count, 7, Convert.ToString(p.PNRProductivity + "%"));
                            MyCTSExcel.CreateCell(cell);
                            cell = new MyCTSExcel.Cell(count, 8, Convert.ToString(p.CancelledPNRProductivity + "%"));
                            MyCTSExcel.CreateCell(cell);
                            cell = new MyCTSExcel.Cell(count, 9, Convert.ToString(p.AvgScanPerPNRProductivity + "%"));
                            MyCTSExcel.CreateCell(cell);

                            //Boletos Emitidos-
                            cell = new MyCTSExcel.Cell(count, 11, Convert.ToString(p.EmittedTKTProductivity + "%"));
                            MyCTSExcel.CreateCell(cell);
                            cell = new MyCTSExcel.Cell(count, 12, Convert.ToString(p.CancelledTKTProductivity + "%"));
                            MyCTSExcel.CreateCell(cell);

                            //Efectividad
                            cell = new MyCTSExcel.Cell(count, 14, Convert.ToString(p.TotalPNRVsTKTProductivity + "%"));
                            MyCTSExcel.CreateCell(cell);

                            count++;
                        }
                        #endregion

                        MyCTSExcel.SaveFile(fileName);
                    }
                }
            }

            if (!string.IsNullOrEmpty(fileName))
            {
                Process proc = new Process();
                proc.StartInfo.Arguments = "\"" + fileName + "\"";
                proc.StartInfo.FileName  = "EXCEL.EXE";
                proc.Start();
            }

            #endregion
        }
        /// <summary>
        /// Armado del archivo excel(encabezado y contenido) y guardado en
        /// temporales
        /// </summary>
        private void CreateExcel()
        {
            if (SearchDQBAstETU)
            {
                ReportDBQBucle();
                FixDQBETUReport();
                Microsoft.VisualBasic.Devices.Computer MyComputer = new Microsoft.VisualBasic.Devices.Computer();
                string fileName = string.Empty;
                int    count    = 0;

                #region Generacion documento Excel

                using (MyCTSExcel objExcel = new MyCTSExcel())
                {
                    objExcel.CreateExcelObject("MyCTS");
                    if (objExcel.IsObjectCreated)
                    {
                        fileName = MyComputer.FileSystem.SpecialDirectories.Temp;
                        fileName = fileName + string.Format("\\TempFile_{0}.xls", Guid.NewGuid().ToString());

                        MyCTSExcel.Cell cell = null;
                        cell           = new MyCTSExcel.Cell(2, 2, titulo);
                        cell.Bold      = true;
                        cell.Wide      = 6;
                        cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                        objExcel.CreateCell(cell);
                        cell      = new MyCTSExcel.Cell(3, 2, "ITM");
                        cell.Bold = true;
                        objExcel.CreateCell(cell);
                        cell      = new MyCTSExcel.Cell(3, 3, "PASSENGER NAME");
                        cell.Bold = true;
                        objExcel.CreateCell(cell);
                        cell      = new MyCTSExcel.Cell(3, 4, "TKT NUMBER");
                        cell.Bold = true;
                        objExcel.CreateCell(cell);
                        cell      = new MyCTSExcel.Cell(3, 5, "DK NUMBER");
                        cell.Bold = true;
                        objExcel.CreateCell(cell);
                        cell      = new MyCTSExcel.Cell(3, 6, "ORIGINAL DATE ISSUE");
                        cell.Bold = true;
                        objExcel.CreateCell(cell);
                        cell      = new MyCTSExcel.Cell(3, 7, "DATE ADDED TO REPORT");
                        cell.Bold = true;
                        objExcel.CreateCell(cell);
                        cell      = new MyCTSExcel.Cell(3, 8, "DATE TO BE PURGED FROM REPORT");
                        cell.Bold = true;
                        objExcel.CreateCell(cell);

                        #region Elementos2

                        count = 4;
                        int numberPassengers = PassengerList.Count;
                        progressBar1.Visible = true;
                        progressBar1.Maximum = numberPassengers;
                        progressBar1.Value   = 0;
                        CommandsAPI2.send_MessageToEmulator(Resources.TicketEmission.Constants.GENERATING_FILE_EXCEL);

                        foreach (Passenger p in PassengerList)
                        {
                            cell = new MyCTSExcel.Cell(count, 2, p.Item);
                            objExcel.CreateCell(cell);
                            cell = new MyCTSExcel.Cell(count, 3, p.Name);
                            objExcel.CreateCell(cell);
                            cell = new MyCTSExcel.Cell(count, 4, p.TKTNumber);
                            objExcel.CreateCell(cell);
                            cell = new MyCTSExcel.Cell(count, 5, p.DKNumber);
                            objExcel.CreateCell(cell);
                            cell = new MyCTSExcel.Cell(count, 6, p.Original);
                            objExcel.CreateCell(cell);
                            cell = new MyCTSExcel.Cell(count, 7, p.DateAdd);
                            objExcel.CreateCell(cell);
                            cell = new MyCTSExcel.Cell(count, 8, p.DateToBe);
                            objExcel.CreateCell(cell);
                            progressBar1.Value = count - 3;
                            if (count % 20 == 0)
                            {
                                CommandsAPI2.send_MessageToEmulator(Resources.TicketEmission.Constants.GENERATING_FILE_EXCEL);
                            }
                            count++;
                        }

                        #endregion

                        objExcel.SaveFile(fileName);
                    }
                }
                if (!string.IsNullOrEmpty(fileName))
                {
                    Process proc = new Process();
                    proc.StartInfo.Arguments = "\"" + fileName + "\"";
                    proc.StartInfo.FileName  = "EXCEL.EXE";
                    proc.Start();
                }
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);

                #endregion
            }
        }
        /// <summary>
        /// Genera el archivo excel que contiene la información de la sabana de vuelo
        /// </summary>
        private void BuildSabana()
        {
            List <GetInfoGroup> indexList = new List <GetInfoGroup>();

            if (rdoPNR.Checked)
            {
                indexList = GetInfoGroupBL.GetInfoGroup(txtPNR.Text, Login.OrgId);
            }
            else
            {
                indexList = GetInfoGroupByIDGroupBL.GetInfoGroup(txtGroup.Text, Login.OrgId);
            }
            if (indexList.Count > 0)
            {
                CommandsAPI2.send_MessageToEmulator("GENERANDO SABANA DE VUELO, FAVOR DE ESPERAR.........");
                InfoGroupList        = new List <InfoGroup>();
                progressBar1.Maximum = indexList.Count;
                for (int i = 0; i < indexList.Count; i++)
                {
                    InfoGroup info = new InfoGroup();
                    info.Name          = string.Concat(indexList[i].PaxName, " ", indexList[i].PaxLastName);
                    info.Origin        = indexList[i].Origin;
                    info.Destination   = indexList[i].Destination;
                    info.DepartureTime = indexList[i].DepartureTime;
                    info.ArrivalTime   = indexList[i].ArrivalTime;
                    info.AirlineCode   = indexList[i].AirlineCode;
                    info.AirlineRef    = indexList[i].AirlineRef;
                    info.FlightNumber  = indexList[i].FlightNumber;
                    info.DepartureDate = Convert.ToString(indexList[i].DepartureDate);
                    info.PaxNumber     = Convert.ToString(indexList[i].PaxNumber);
                    info.RecLoc        = indexList[i].RecLoc;

                    InfoGroupList.Add(info);
                }
                Microsoft.VisualBasic.Devices.Computer MyComputer = new Microsoft.VisualBasic.Devices.Computer();
                string fileName = string.Empty; //Environment.GetFolderPath(Environment.SpecialFolder.InternetCache);
                int    count    = 7;
                int    j        = 3;

                using (MyCTSExcel objExcel = new MyCTSExcel())
                {
                    objExcel.CreateExcelObject("MyCTS");
                    if (objExcel.IsObjectCreated)
                    {
                        fileName = MyComputer.FileSystem.SpecialDirectories.Temp;
                        fileName = fileName + string.Format("\\TempFile_{0}.xls", Guid.NewGuid().ToString());
                        MyCTSExcel.Cell cell = null;
                        cell           = new MyCTSExcel.Cell(2, 2, string.Concat("SABANA DE VUELO ", indexList[0].IDGroup, " / RECORD MAESTRO: ", indexList[0].MasterPNR));
                        cell.Wide      = 8;
                        cell.Bold      = true;
                        cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                        objExcel.CreateCell(cell);
                        cell = new MyCTSExcel.Cell(3, 2, string.Concat("REPORTE EMITIDO EL ",
                                                                       DateTime.Now.ToString("dd/MMM/yyyy").ToUpper(), " a las ", DateTime.Now.ToString("HH:mm"), " Hrs."));
                        cell.Wide      = 8;
                        cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                        objExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(5, 3, "SEGMENTO 1");
                        cell.Wide      = 7;
                        cell.Bold      = true;
                        cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                        objExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(6, 2, "Nombre");
                        cell.Bold      = true;
                        cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                        objExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(6, 3, "Origen");
                        cell.Bold      = true;
                        cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                        objExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(6, 4, "Destino");
                        cell.Bold      = true;
                        cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                        objExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(6, 5, "Salida");
                        cell.Bold      = true;
                        cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                        objExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(6, 6, "LLegada");
                        cell.Bold      = true;
                        cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                        objExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(6, 7, "LA");
                        cell.Bold      = true;
                        cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                        objExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(6, 8, "Vuelo");
                        cell.Bold      = true;
                        cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                        objExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(6, 9, "Fecha");
                        cell.Bold      = true;
                        cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                        objExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(6, 10, "Clave Aerolínea");
                        cell.Bold      = true;
                        cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                        objExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(6, 11, "Clave Aerolínea");
                        cell.Bold      = true;
                        cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                        objExcel.CreateCell(cell);
                        cell = new MyCTSExcel.Cell(count, 2, InfoGroupList[0].Name);
                        objExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(count, 3, InfoGroupList[0].Origin);
                        cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                        objExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(count, 4, InfoGroupList[0].Destination);
                        cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                        objExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(count, 5, InfoGroupList[0].DepartureTime);
                        cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                        objExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(count, 6, InfoGroupList[0].ArrivalTime);
                        cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                        objExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(count, 7, InfoGroupList[0].AirlineCode);
                        cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                        objExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(count, 8, InfoGroupList[0].FlightNumber);
                        cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                        objExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(count, 9, InfoGroupList[0].DepartureDate.Substring(0, 10));
                        cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                        objExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(count, 10, InfoGroupList[0].AirlineRef);
                        cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                        objExcel.CreateCell(cell);
                        cell           = new MyCTSExcel.Cell(count, 11, InfoGroupList[0].RecLoc);
                        cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                        objExcel.CreateCell(cell);
                        progressBar1.Visible = true;
                        progressBar1.Value   = 1;
                        int barValue = 1;
                        int count2   = 0;
                        int max      = 0;
                        int aux      = 0;
                        for (int i = 1; i < InfoGroupList.Count; i++)
                        {
                            if (InfoGroupList[i].PaxNumber == InfoGroupList[i - 1].PaxNumber)
                            {
                                j              = j + 8;
                                cell           = new MyCTSExcel.Cell(count, j, InfoGroupList[i].Origin);
                                cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                                objExcel.CreateCell(cell);
                                cell           = new MyCTSExcel.Cell(count, j + 1, InfoGroupList[i].Destination);
                                cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                                objExcel.CreateCell(cell);
                                cell           = new MyCTSExcel.Cell(count, j + 2, InfoGroupList[i].DepartureTime);
                                cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                                objExcel.CreateCell(cell);
                                cell           = new MyCTSExcel.Cell(count, j + 3, InfoGroupList[i].ArrivalTime);
                                cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                                objExcel.CreateCell(cell);
                                cell           = new MyCTSExcel.Cell(count, j + 4, InfoGroupList[i].AirlineCode);
                                cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                                objExcel.CreateCell(cell);
                                cell           = new MyCTSExcel.Cell(count, j + 5, InfoGroupList[i].FlightNumber);
                                cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                                objExcel.CreateCell(cell);
                                cell           = new MyCTSExcel.Cell(count, j + 6, InfoGroupList[i].DepartureDate.Substring(0, 10));
                                cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                                objExcel.CreateCell(cell);
                                cell           = new MyCTSExcel.Cell(count, j + 7, InfoGroupList[i].AirlineRef);
                                cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                                objExcel.CreateCell(cell);
                                cell           = new MyCTSExcel.Cell(count, j + 8, InfoGroupList[i].RecLoc);
                                cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                                objExcel.CreateCell(cell);
                                count2++;
                                if (barValue % 19 == 0)
                                {
                                    CommandsAPI2.send_MessageToEmulator("GENERANDO SABANA DE VUELO, FAVOR DE ESPERAR.........");
                                }
                                barValue++;
                                progressBar1.Value = barValue;
                            }
                            else
                            {
                                aux = count2;
                                if (aux > max)
                                {
                                    max = aux;
                                }
                                else
                                {
                                    max = count2;
                                }
                                count2 = 0;
                                j      = 3;
                                count++;
                                cell = new MyCTSExcel.Cell(count, 2, InfoGroupList[i].Name);
                                objExcel.CreateCell(cell);
                                cell           = new MyCTSExcel.Cell(count, 3, InfoGroupList[i].Origin);
                                cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                                objExcel.CreateCell(cell);
                                cell           = new MyCTSExcel.Cell(count, 4, InfoGroupList[i].Destination);
                                cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                                objExcel.CreateCell(cell);
                                cell           = new MyCTSExcel.Cell(count, 5, InfoGroupList[i].DepartureTime);
                                cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                                objExcel.CreateCell(cell);
                                cell           = new MyCTSExcel.Cell(count, 6, InfoGroupList[i].ArrivalTime);
                                cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                                objExcel.CreateCell(cell);
                                cell           = new MyCTSExcel.Cell(count, 7, InfoGroupList[i].AirlineCode);
                                cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                                objExcel.CreateCell(cell);
                                cell           = new MyCTSExcel.Cell(count, 8, InfoGroupList[i].FlightNumber);
                                cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                                objExcel.CreateCell(cell);
                                cell           = new MyCTSExcel.Cell(count, 9, InfoGroupList[i].DepartureDate.Substring(0, 10));
                                cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                                objExcel.CreateCell(cell);
                                cell           = new MyCTSExcel.Cell(count, 10, InfoGroupList[i].AirlineRef);
                                cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                                objExcel.CreateCell(cell);
                                cell           = new MyCTSExcel.Cell(count, 11, InfoGroupList[i].RecLoc);
                                cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                                objExcel.CreateCell(cell);
                                if (barValue % 19 == 0)
                                {
                                    CommandsAPI2.send_MessageToEmulator("GENERANDO SABANA DE VUELO, FAVOR DE ESPERAR.........");
                                }
                                barValue++;
                                progressBar1.Value = barValue;
                            }
                        }
                        aux = count2;
                        if (aux > max)
                        {
                            max = aux;
                        }
                        else
                        {
                            max = count2;
                        }
                        aux = 11;
                        for (int k = 0; k < max; k++)
                        {
                            cell           = new MyCTSExcel.Cell(5, aux, string.Concat(" SEGMENTO ", k + 2, " "));
                            cell.Wide      = 7;
                            cell.Bold      = true;
                            cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                            objExcel.CreateCell(cell);
                            cell           = new MyCTSExcel.Cell(6, aux, " Origen ");
                            cell.Bold      = true;
                            cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                            objExcel.CreateCell(cell);
                            cell           = new MyCTSExcel.Cell(6, aux + 1, " Destino ");
                            cell.Bold      = true;
                            cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                            objExcel.CreateCell(cell);
                            cell           = new MyCTSExcel.Cell(6, aux + 2, " Salida ");
                            cell.Bold      = true;
                            cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                            objExcel.CreateCell(cell);
                            cell           = new MyCTSExcel.Cell(6, aux + 3, " Llegada ");
                            cell.Bold      = true;
                            cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                            objExcel.CreateCell(cell);
                            cell           = new MyCTSExcel.Cell(6, aux + 4, " LA ");
                            cell.Bold      = true;
                            cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                            objExcel.CreateCell(cell);
                            cell           = new MyCTSExcel.Cell(6, aux + 5, " Vuelo ");
                            cell.Bold      = true;
                            cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                            objExcel.CreateCell(cell);
                            cell           = new MyCTSExcel.Cell(6, aux + 6, " Fecha ");
                            cell.Bold      = true;
                            cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                            objExcel.CreateCell(cell);
                            cell           = new MyCTSExcel.Cell(6, aux + 7, " Clave Aerolínea ");
                            cell.Bold      = true;
                            cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                            objExcel.CreateCell(cell);
                            aux = aux + 8;
                        }
                        cell           = new MyCTSExcel.Cell(6, aux, " Record ");
                        cell.Bold      = true;
                        cell.Alignment = MyCTSExcel.Alignment.MiddleCenter;
                        objExcel.CreateCell(cell);
                    }
                    objExcel.SaveFile(fileName);
                }
                if (!string.IsNullOrEmpty(fileName))
                {
                    Process proc = new Process();
                    proc.StartInfo.Arguments = "\"" + fileName + "\"";
                    proc.StartInfo.FileName  = "EXCEL.EXE";
                    proc.Start();
                }
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
            }
            else
            {
                if (rdoPNR.Checked)
                {
                    MessageBox.Show("EL RECORD LOCALIZADOR NO VALIDO O INEXISTENTE", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else if (!GetInfoGroupByIDGroupBL.Status)
                {
                    MessageBox.Show("EL NOMBRE DE GRUPO NO EXISTE", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    MessageBox.Show("EL GRUPO AUN NO CONTIENE PASAJEROS", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
            }
        }