Automating My Boring Office Job with 50 Lines of Python — An enterprise-grade, local AI pipeline that transforms messy spreadsheets, broken CSVs, and Word documents into clean, structured data and an interactive single-file HTML dashboard.
Office workers and data analysts spend countless hours cleaning broken .xlsx spreadsheets, malformed .csv files, and unformatted .docx office memos:
- Merged headers and inconsistent date formats (
2026/07/15,July 16, 2026,17-07-26). - Mixed currency strings (
$1,250.00,EUR 450,1250 USD). - Duplicate vendor names (
AMZN Mktp,Amazon Inc,amzn). - Unstructured executive context locked inside Word documents.
Xberg Data Launderer pairs Xberg (the ultra-fast document intelligence engine) with local structured LLM extraction via Ollama (llama3.2:3b) to automatically parse, standardize, repair, and visualize office document bundles in under 10 seconds.
| Layer | Tool / Library | Role |
|---|---|---|
| Document Parsing | Xberg | Extracts multi-sheet Excel tables, raw CSV data, and DOCX memo content |
| Local AI Engine | Ollama (llama3.2:3b) |
Schema-driven JSON extraction, entity normalization, date standardization |
| Data Generation & Packing | Python zipfile, openpyxl, docx |
Creates realistic messy office .zip bundles with embedded images |
| Output Visualizer | HTML5 / Modern Vanilla CSS | Standalone interactive dashboard with live search, filters, & statistics |
Ensure Python 3.10+ and Ollama are installed on your machine.
Download and start the lightweight local LLM model:
ollama run llama3.2:3bInstall xberg along with helper utility packages:
pip install xberg ollama openpyxl python-docx pandas pillowCreate the messy office ZIP package containing broken spreadsheets and a DOCX memo with embedded visuals:
python make_sample_zip.pyExecute the end-to-end extraction, AI laundering, and dashboard generation:
python launder.pyOpen the generated HTML dashboard in your web browser:
Start-Process index.html├── make_sample_zip.py # Generates realistic messy .xlsx, .csv & .docx inside sample_office_data.zip
├── launder.py # Clean Python script for extraction, AI laundering & dashboard rendering
├── dashboard_template.html # Standalone HTML dashboard template with dark-mode styling & filters
├── sample_office_data.zip # Sample office archive containing dirty spreadsheets & executive memo
├── cleaned_data.json # Structured, validated JSON output produced by Ollama & Xberg
├── cleaned_summary.csv # Exportable clean CSV summary table
└── index.html # Interactive dark-mode HTML visualizer & executive dashboard
flowchart LR
A[sample_office_data.zip] --> B[Xberg Engine]
B -->|XLSX / CSV / DOCX| C[Raw Document Extraction]
C --> D[Ollama llama3.2:3b]
D -->|Structured Schema| E[Clean JSON / CSV]
E --> F[index.html Visual Dashboard]
- Quarterly Expense Audit: Clean inconsistent credit card statements from multiple employee CSV files without writing custom regex rules.
- Supplier Invoice Reconciliation: Standardize vendor naming variants (
Amazon,AMZN Mktp,Amazon Web Services) across thousands of invoices. - M&A Due Diligence Data Intake: Parse mixed Zip archives containing financial models and executive memos into structured analytics schemas.
- CRM Contact Ingestion: Standardize customer names, phone numbers, and transaction amounts gathered from disparate regional sales spreadsheets.
- Automated Executive Reporting: Synthesize numerical tables and Word memo summaries into a unified executive dashboard automatically.
- Multi-Currency FX Conversion: Real-time currency normalization using live exchange rate APIs.
- Automated Anomaly & Fraud Detection: Flag unusual transaction amounts or suspicious duplicate invoices using AI heuristics.
- Multi-Model Fallback Chains: Seamless fallback from local Ollama to remote cloud providers for massive batch workloads.
- Direct ERP Integration: Push cleaned structured records directly into SAP, QuickBooks, or Salesforce APIs.
- Interactive Data Editing Interface: Allow manual inline corrections in the HTML dashboard before final ERP sync.
Xberg Document Intelligence OCR Local AI Ollama llama3.2 Python Spreadsheet Extraction Data Launderer Automate Boring Office Job Data Sanitization Excel Automation CSV Repair Word DOCX Extraction
Distributed under the MIT License.