r/ForgeYourProject • • 18h ago

I built an open-source offline Python tool to clean messy Excel files and generate PDF/HTML reports

I kept running into messy Excel exports (shifted headers, merged cells, weird date formats, broken totals) and couldn't upload sensitive files to random web tools, so I built an offline Python app to clean them up and generate reports locally.

Repo: https://github.com/onur18/Excel-Master-Pro

Sample HTML report output: https://onur18.github.io/Excel-Master-Pro/demo.html

Main things it does:

- Detects shifted or multi-row headers without losing the first data row

- Checks for 13 common issues (bad emails/phones, negative prices/stock, duplicates, outliers, and math mismatches like Qty * Price != Total)

- Previews changes before applying them and logs edits in a local SQLite DB so you can undo anything

- Merges multiple Excel/CSV files even if the column names don't match

- Exports a PDF report, a standalone interactive HTML dashboard, and a cleaned .xlsx file

Since it's meant to handle untrusted spreadsheets locally, I avoided eval() completely and wrote an allow-listed ast.parse evaluator for custom formulas, locked down DuckDB external access, and added magic-byte + zip-bomb checks on upload.

Built with Python, Streamlit, Pandas, DuckDB, and Plotly. Let me know if you spot any edge cases or have ideas for the next version.

2 Upvotes

4 comments sorted by

1

u/IncomeOk7237 17h ago

does the undo work if you close the app and reopen later, or only in the same session?

1

u/Western-Policy-8910 17h ago

Right now the active undo stack only works within the same session since the working dataframe lives in Streamlit's session state, while the SQLite audit log persists on disk for inspection. Reloading previous quarantine snapshots into a new session is actually a great idea for the next update.

1

u/IncomeOk7237 16h ago

makes sense. would the audit log be enough to replay the steps in a new session, or is it just for reading?

1

u/Western-Policy-8910 15h ago

Mostly just for reading right now. It logs what changed and saves the bad rows, not the full parameters needed to re-run custom formulas or merges from scratch. Letting users export the steps as a JSON recipe to replay in a new session is high on my list though.