Skip to content

Repository files navigation

Excel Form Filler

Excel Form Filler turns Excel workbook templates into simple desktop forms.

Instead of asking people to type directly into a spreadsheet, you describe the fields in a JSON schema. The app builds a form from that schema, validates the entered values, and saves a filled copy of the Excel template.

It is useful for recurring Excel-based workflows such as admin forms, HR records, reports, checklists, applications, approvals, and other documents where the template already exists but direct spreadsheet editing is awkward or error-prone.

Documentation

For detailed help, start in the Docs folder:

  • User Guide: how to choose files, edit a schema, validate input, and generate a workbook.
  • Schema Reference: shared schema structure, validation keys, layout keys, and Excel formatting keys.
  • Field Type Docs: one page for each supported field type.

What The App Does

  • Builds a desktop form from a JSON schema.
  • Writes submitted values into specific Excel cells or ranges.
  • Supports multiple Excel sheets.
  • Supports text, numbers, currency, percent, dates, times, dropdowns, radio buttons, checkboxes, booleans, long text, file paths, images, signatures, lists, tables, hidden values, computed values, and formulas.
  • Validates required fields, lengths, numeric ranges, regex patterns, email addresses, phone numbers, choice values, list sizes, and table rows.
  • Applies optional Excel formatting such as number formats, fonts, fills, alignment, borders, and date formats.
  • Saves generated workbooks through a Save As dialog.
  • Remembers previous submissions and offers suggestions for repeated values.
  • Stores selected schema and template files in app data so they remain available across launches.

Quick Example

The app needs two files:

  1. A schema JSON file that describes the form fields.
  2. An Excel workbook template where the values should be written.

Example schema:

{
  "form": [
    {
      "sheet": "Sheet1",
      "inputs": [
        {
          "id": "first_name",
          "label": "First Name",
          "type": "string",
          "required": true,
          "coords": ["A", 1]
        },
        {
          "id": "age",
          "label": "Age",
          "type": "number",
          "min_value": 0,
          "coords": ["B", 1]
        }
      ]
    }
  ]
}

When the user fills the form and generates a workbook, first_name is written to Sheet1!A1, and age is written to Sheet1!B1.

For more schema examples, see the Schema Reference and the field type docs.

Main Tabs

  • Form: Fill, validate, clear, and generate the workbook.
  • Settings: Choose the schema JSON, Excel template, and output folder. The current schema can also be edited here.
  • Instructions: In-app schema notes and supported field types.
  • About: Project information, credits, license, and local storage paths.

Templates

Starter files live in templates/:

  • input.json: compact example schema.
  • input_showcase.json: larger schema demonstrating supported field types.
  • template.xlsx: starter Excel workbook template.

Requirements

  • Windows
  • Python 3.10 or newer
  • Runtime dependencies from requirements.txt
  • Development and build dependencies from requirements-dev.txt

Install dependencies:

py -m pip install -r requirements.txt
py -m pip install -r requirements-dev.txt

If py points to the wrong Python installation, use the full path to the intended python.exe.

Run From Source

py src/formfiller/main.py

Build The Exe

Build a fresh executable:

powershell -ExecutionPolicy Bypass -File scripts/build_exe.ps1 -Clean

The output file is:

dist/FormFiller.exe

The PyInstaller build uses formfiller.spec and bundles the application code, PySide6 runtime pieces, QSS theme, SVG assets, and starter templates.

Local Storage

User settings are stored under:

%APPDATA%/FormFiller

The app also stores managed copies of selected schema and template files there. Generated workbooks are saved to the selected output folder.

Tests

Run the full test suite:

py -m pytest tests --basetemp .pytest_tmp

--basetemp .pytest_tmp keeps pytest temporary files inside the workspace, which avoids Windows temp-folder permission issues on some machines.

Project Layout

src/formfiller/
  app.py                    Application bootstrap
  main.py                   Source entry point
  core/
    config.py               JSON schema loading and validation
    state.py                Application state
    utils.py                Shared helpers
  features/form_filler/
    logic.py                Validation and value normalization
    ui.py                   Dynamic form builder and field widgets
  services/
    file_service.py         Excel read/write and output path logic
    history_service.py      Previous value suggestions
    settings_service.py     App settings and managed file storage
  ui/
    components/             Reusable UI widgets
      tabs/                 Main window tab builders
    themes/app.qss          Application stylesheet
    windows/main_window.py  Main window
  assets/                   Icons and UI assets

License

GNU General Public License v2.0 or later.

About

Windows desktop app that generates JSON-driven forms and fills Excel workbook templates.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages