This Python script automates the creation of a structured Excel workbook using xlsxwriter
and openpyxl
. It includes dropdowns, validations for integers, floats, dates, and formatted columns. Designed to streamline the creation of engineering BOM or design review sheets.
- Excel file output with pre-defined columns
- Drop-down validation for categorical inputs (e.g., Yes/No, Orientation)
- Integer and float validations with input guidance
- Date validations within a defined range
- Automatically fills serial numbers in Column A
- Customized formatting for headers and columns
- Python 3.x
- xlsxwriter
- openpyxl
Install dependencies:
pip install xlsxwriter openpyxl
Run the script:
python generate_excel_template.py
This will generate a file named data_validate.xlsx
in the working directory.
- Sheet Name: Default
- Column A: Auto-filled serial numbers (0–300)
- Column B to Q: Pre-defined headers with validation and formatting
excel python xlsxwriter data-validation engineering bom-template automation design-review spreadsheet form-generator python-excel dropdown-list float-validation integer-validation date-validation template-generator structured-input data-entry openpyxl sheet-automation