Skip to content

GimpyHand/Dynamics-GP-AR-AP-Exporter-Parser

Repository files navigation

GP Export Extraction

A small Windows desktop utility to extract data from GP (Dynamics GP) Aged AR/AP report PDFs into a formatted Excel file. It provides a simple GUI to choose AR or AP mode, select a PDF, and generates an Excel file next to the source PDF.

  • App: GUI built with Tkinter (no console window)
  • Build: PyInstaller (spec file included)
  • Target users: finance/accounting teams exporting AR/AP PDFs from GP

Features

  • AR mode (Aged AR Listing-style PDFs)
    • Parses customer, document details, dates, and amounts
    • Exports formatted Excel with currency formatting and a totals row
    • Output file name: _Parsed.xlsx (note capital P)
    • If the output Excel is locked/in use, saves with a numeric suffix (e.g., _Parsed_v1.xlsx)
  • AP mode (Aged AP Summary by Vendor-style PDFs)
    • Parses vendor, payment method, voucher counts, totals and aging buckets
    • Exports formatted Excel with currency formatting and a totals row
    • Output file name: _parsed.xlsx (note lowercase p)
  • Friendly UI: choose AR/AP, select PDF, and see a completion dialog with row count and a small animation

Getting Started (Run from source)

  1. Install Python 3.10+ for Windows (recommended) and ensure “py”/“python” is on PATH.
  2. Install dependencies:
    • pip install pdfplumber pandas xlsxwriter openpyxl pillow
  3. Run the app:
    • py main.py
    • Select AR or AP, click “Select PDF”, then choose the report PDF exported from GP.
  4. Find the output Excel in the same folder as the PDF:
    • AR: _Parsed.xlsx
    • AP: _parsed.xlsx

Notes

  • If Excel reports are open/locked, AR mode automatically retries with _vN suffix.
  • The app attempts to detect dates and apply reasonable aging bucket logic; PDFs with significantly different layouts may parse less accurately.

Using the Packaged EXE

  • If you have a packaged build (dist/GP Export Extraction.exe or a Release zip), just double-click the EXE.
  • No Python installation required on the target machine.

Build and Release

Two ways to build with PyInstaller:

A) Using the provided spec file (recommended)

  • py -m PyInstaller "GP Export Extraction.spec"

B) One-off command example (for reference; main.py header shows options)

  • py -m PyInstaller --onefile --windowed --name "GP Export Extraction" --icon "icon.ico"
    --hidden-import AR_Files --hidden-import AP_Files
    --add-data "icon.ico;." --add-data "icon.png;." --add-data "dancing.gif;." main.py

Automated build script (preferred on Windows)

  • The repository includes build.ps1 to build and package a zip for distribution.
  • Examples:
    • powershell -ExecutionPolicy Bypass -File .\build.ps1
    • powershell -ExecutionPolicy Bypass -File .\build.ps1 -Version 1.0.0 -Clean
  • Output:
    • dist/GP Export Extraction.exe (or onedir variant)
    • release/GP-Export-Extraction--win.zip (upload this in a GitHub Release)

Files of Interest

  • main.py — Tkinter GUI launcher.
  • AR_Files.py — AR parsing/export logic.
  • AP_Files.py — AP parsing/export logic.
  • GP Export Extraction.spec — PyInstaller spec (includes icons and GIF in the bundle).
  • build.ps1 — Windows build/packaging script.
  • icon.ico, icon.png — app icons.

Requirements

  • Windows 10/11.
  • For running from source:
    • Python 3.10+ (Tkinter included with standard CPython installs on Windows)
    • Packages: pdfplumber, pandas, xlsxwriter (optional but preferred), openpyxl (fallback), pillow (for GIF decoding; optional)
  • For running the EXE: no additional dependencies.

Troubleshooting

  • “pyinstaller not found” when running build.ps1: Install with pip install pyinstaller, or ensure Python Scripts directory is on PATH. The script will try python -m PyInstaller if pyinstaller isn’t on PATH.
  • Output Excel won’t save due to file lock: Close the target Excel file and retry; AR mode also attempts _vN filenames automatically.
  • Parsing accuracy: These scripts rely on text extraction from PDFs via pdfplumber. If your report layout is different (headers/columns vary), results may need validation. Consider sharing a sample layout for adjustment.
  • No dancing.gif or icons in dialogs when running from source: Ensure the working directory contains icon.ico, icon.png, and dancing.gif (PyInstaller bundles these automatically in the EXE build).

Privacy & Data Handling

  • PDFs are processed locally; no data leaves your machine.
  • Output files are created in the same directory as the input PDF.

Changelog

  • v1.0.0 (2025-08-15)
    • Initial public/internal release with AR/AP parsing and Excel export
    • GUI with AR/AP selection and success dialog
    • PyInstaller spec and Windows build script (build.ps1)

About

A small python app to parse AP/AR PDFs exported out of Dynamics GP

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors