Dynamically make docx files from a word doc template.
Each file is unique based on data from CSV
pip install docxtpl
As per previous video - except now fully working and getting the data from a csv - 1 row in the csv produces 1 docx file with those values.
To use this yourself you need :
1 x docx file to use as a "Template" +
1 x csv file with column names that match the {{txt}} txt in the braces.
1 x python code used here, get it from Github.
Make the template from scratch, or tweak an existing file. Same applies to the csv.
Then install "pip3 install docxtpl" (https://pypi.org/project/docxtpl/).
Big thankyou to Eric Lapouyade who made the module.
100 word docs in no time. What's all the fuss about!
I'll obviously say I made them all manually....
source code = https://github.com/DrPi101/Python/blo...
template = https://github.com/DrPi101/Python/blo...
ScraperAPI - promo code:
------------------------------------------
⭕ 10% off ScraperAPI : https://www.scraperapi.com?fpr=ken49
✅ Coupon Code: DRPI10
If you want to see how to web scrape a site heavy on JavaScript have a look at this video :
⭕ • Scraping Dynamic Sites with Scraper A...
!! See the new version of this video for 2021 : • Word DOCX From Template | Python
#word #csv #python
Buy Dr Pi a Coffee...or Tea! : https://www.buymeacoffee.com/DrPi
Смотрите видео Dynamically make docx files from a template | Data from CSV | docxtpl онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Python 360 04 Март 2020. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 2,419 раз и оно понравилось 29 посетителям.