How to Create Multiple Word/DocX files from 1 template with graphs made from CSV data | Python Code

preview_player
Показать описание
CSV data is used, with each row supplying the data for 1 graph, made using matplotlib and Python code.

The graphs are then saved as png files and 1 new DOCX file is made PER graph, based on a Word/DOCX template.

★ code reads rows in csv*
★ code generates graphs
★ code saves graphs
► user makes docx template (once only)
► user checks graphs and moves into 'images' folder

★ code generates new docx file / inserts graph ( *once per row of csv)
see the results at 20:19

#python #automation #csv

If this is of interest as a user or as a coder then have a watch - I've endeavoured to explain the usage and the code. All comments, suggestions will be welcome.

This is not intended as a tutorial but you will see explanations of the code, and its usage.

My code is on GitHub and feel free to use/modify as you see fit.

Some of the items involved with this code are:

.csv files ✔
graphs (saved as .png) ✔
.docx files ✔
word/docx templates ✔

The file paths need to be adhered to, as I have yet to add error checking and/or folder creation.

Run these files in this order :

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

The best parts are when you troubleshoot the code and think out loud. Grat video thanks!

ipgsageuniversity
welcome to shbcf.ru