Skip to content

This application is useful for creating certificates, diplomas, or any other type of document that requires a large number of documents with the same format but different data.

Notifications You must be signed in to change notification settings

isaidj/Automatic-Document-Generator-from-Template-Excel-to-Docx-Pdf

Repository files navigation

drawing Automatic Document Generator from Template

drawing

This application is useful for creating certificates, diplomas, or any other type of document that requires a large number of documents with the same format but different data.

Facilitates automatic creation of Word documents (.docx) or PDF from a predefined template. The template should contain placeholder markers, such as [name], [id], which will be replaced with specific values.

How to use

  1. Document Template:

    • Create a Word document with placeholder markers that match the column names in your Excel file. For example: [name], [id].

    Naming Convention

  2. Excel File:

    • Prepare an Excel file with data. Ensure that the columns have the same names as the markers in the template.

    Excel File

  3. Open .exe file:

    • Open the .exe file and follow the instructions. Excel File
  4. Fields:

    • Fill in the fields with the path of the doc template and the Excel file.
    • File name is optional, it will be the prefix of the documents.
    • Select the column: Select the column that will be used to name the documents.
    • File name and select the column will be concatenated to name the documents. Excel File
    • You can generate PDF files by checking the -PDF?- box too. Excel File
  5. Done:

    • Automatically the script will create the documents with the data of the Excel file. Excel File
  6. Docx result:Excel File

If you want to run the script directly

Requirements

Make sure you have the necessary libraries installed:

pip install pandas python-docx

Run

python main.py

Generate .exe file

pip install cx_Freeze
python setup.py build

Credits

This script was created by me, [@Isai_hernandez]

About

This application is useful for creating certificates, diplomas, or any other type of document that requires a large number of documents with the same format but different data.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages