Python : CSV to DOCX | Dynamically make DOCX files from each row of CSV using template with 'if'

preview_player
Показать описание
Make DOCX (Word) files - multiple files using Python and a Template file.The template file is a DOCX with the field names of the CSV written into the template with {{ column name }} and additionally: some IF LOGIC to alter the text based on values in the cell of the CSV file.

Note: I use the same python code here as per previous project, the only thing that changes here is the "if" in the TEMPLATE docx file.

◉ This was a request from a subscriber, which was good as it was something I hadn't thought of using before.

◉ My code is based on using : "python-docx-template" written by Eric Lapouyade
◉ pip install docxtpl
◉ "from docxtpl import DocxTemplate"

Get all my code from :

The code for this project from:

Don't forget to...Sub....Sub....Subscribe..

Рекомендации по теме
Комментарии
Автор

Thanks Dr. Pi. Exactly what I was looking for. Appreciate it!

axelrein
Автор

what is the name of the soundtrack running after 7:30 ? :D

Qwerty-scmo