<jupyter_start><jupyter_text>LOAD DOCUMENT MODEL<jupyter_code>doc = Document(Path().absolute().parent.parent/ "data/power_of_attorney_model.docx")
fullText = "\n".join([par.text for par in doc.paragraphs])<jupyter_output><empty_output><jupyter_text>LOAD EXCEL WITH VARIABLES AND VALUES<jupyter_code>df = pd.read_excel(Path().absolute().parent.parent/ "data/power_of_attorney_model.xlsx")
dictionary_vars = {'currentDay':datetime.now().day, "currentMonth":datetime.now().month, "currentYear":datetime.now().year}
for row in df.to_dict("records"):
    dic_aux = dictionary_vars.copy()
    dic_aux.update(row)
    new_doc = Document()
    new_doc.add_paragraph(fullText.format(**dic_aux))
    new_doc.save(str(row["FILENAME"])+".docx")<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup