//static private void ExecutePDFAutofill(this Autofill autofill, // string fullPath, bool uploaded) { // var defaults = autofill.StepDataObject.DataItem.GetPDFFormFields(); // try { // var pdfFields = PdfFieldsReader.GetFields(fullPath); // JsonObject json = new JsonObject(); // foreach (var field in pdfFields) { // if (uploaded) { // json.AddIfValue(field.Key, field.Value); // } else { // json.Add(field.Key, field.Value); // } // } // autofill.AutofillFields = json; // autofill.Save(); // } catch (Exception e) { // throw e; // } //} static private void FillOutMensualActividadesCNH(this Autofill autofill, string fullPath) { try { var excel = OpenXMLSpreadsheet.Open(fullPath); var tasks = ReportingRepository.GetCNHActividad(); int i = 12; foreach (var task in tasks) { excel.SetCell($"T{i}", "Vista Oil & Gas Holding II, S.A. de C.V."); excel.SetCell($"U{i}", "Vernet-1001EXP"); excel.SetCell($"V{i}", "CNH-R02-L03-CS-01/2017"); //excel.SetCell($"M{i}", random.Next(0, 12)); //excel.SetCell($"N{i}", random.Next(5, 10)); //excel.SetCell($"O{i}", random.Next(1, 10)); //excel.SetCell($"P{i}", random.Next(4, 9)); //excel.SetCell($"Q{i}", random.Next(0, 50)); //excel.SetCell($"R{i}", random.Next(0, 30)); //excel.SetCell($"S{i}", random.Next(10, 50)); //excel.SetCell($"T{i}", random.Next(20, 40)); //excel.SetCell($"U{i}", random.Next(5, 40)); //excel.SetCell($"V{i}", random.Next(0, 50)); } excel.Save(); excel.Close(); } catch (Exception e) { throw e; } }