static private void FillOutBitacoraOperaciones(this Autofill autofill, string fullPath) { try { var excel = OpenXMLSpreadsheet.Open(fullPath); var tasks = ReportingRepository.GetCNIHOperacionDiaria(); int i = 5; foreach (var task in tasks) { excel.SetCell($"A{i}", "Vista Oil & Gas Holding II, S.A. de C.V."); excel.SetCell($"B{i}", "Vernet-1001EXP"); excel.SetCell($"C{i}", "590480190000200"); excel.SetCell($"D{i}", "CNH-R02-L03-CS-01/2017"); excel.SetCell($"E{i}", task.Get <string>("diasEnOperacion", String.Empty).ToUpper()); excel.SetCell($"F{i}", task.Get <string>("proximoMovimiento", String.Empty).ToUpper()); excel.SetCell($"G{i}", task.Get <string>("tipoTerminacion", String.Empty).ToUpper()); excel.SetCell($"H{i}", task.Get <string>("registroHidrocarburos", String.Empty).ToUpper()); excel.SetCell($"I{i}", task.Get <string>("fechaReporte", String.Empty).ToUpper()); excel.SetCell($"J{i}", task.Get <string>("tiempoDias", String.Empty).ToUpper()); excel.SetCell($"K{i}", task.Get <string>("metrosDesarrollados", String.Empty).ToUpper()); excel.SetCell($"L{i}", task.Get <string>("metrosVerticales", String.Empty).ToUpper()); excel.SetCell($"M{i}", task.Get <string>("pesoAplicadoBarrena", String.Empty).ToUpper()); excel.SetCell($"N{i}", task.Get <string>("velocidadMR", String.Empty).ToUpper()); excel.SetCell($"O{i}", task.Get <string>("presionBomba", String.Empty).ToUpper()); excel.SetCell($"P{i}", task.Get <string>("torque", String.Empty).ToUpper()); excel.SetCell($"Q{i}", task.Get <string>("pesoSarta", String.Empty).ToUpper()); i++; } excel.Save(); excel.Close(); } catch (Exception e) { throw e; } }