예제 #1
0
        static private void FillOutSasisopa(this Autofill autofill,
                                            string fullPath)
        {
            try {
                var excel = OpenXMLSpreadsheet.Open(fullPath);

                var tasks = ReportingRepository.GetSasisopaTasksList(autofill.StepDataObject);

                int i = 4;

                foreach (var task in tasks)
                {
                    excel.SetCell($"A{i}", task.Get <string>("anexo", String.Empty));
                    excel.SetCell($"B{i}", task.Get <string>("elemento", String.Empty));
                    excel.SetCell($"C{i}", task.Get <string>("actividad", String.Empty));
                    excel.SetCell($"D{i}", task.Get <string>("descripcion", String.Empty));
                    excel.SetCell($"E{i}", task.Get <string>("fechasInicio", String.Empty));
                    excel.SetCell($"F{i}", task.Get <string>("fechasTermino", String.Empty));
                    excel.SetCell($"G{i}", task.Get <string>("periodicidad", String.Empty));
                    excel.SetCell($"H{i}", task.Get <string>("responsable", String.Empty));
                    excel.SetCell($"I{i}", task.Get <string>("evidencias", String.Empty));
                    excel.SetCell($"J{i}", task.Get <string>("documentosAnexos", String.Empty));
                    excel.SetCell($"K{i}", task.Get <string>("avance", String.Empty));
                    excel.SetCell($"L{i}", task.Get <string>("observaciones", String.Empty));
                    excel.SetCell($"M{i}", task.Get <string>("siguientesAcciones", String.Empty));

                    i++;
                }

                excel.Save();

                excel.Close();
            } catch (Exception e) {
                throw e;
            }
        }