Skip to main content
Glama
excel-master-pro

excel-master-pro

CI Release License: MIT Live Demo Python Streamlit CLI & SDK Languages Privacy

Live Demo

Open the sample interactive dashboard


πŸ“Š EXCEL MASTER PRO (v2.2.0 β€” Modular Data Intelligence SDK, CLI, MCP & BI Platform)

EXCEL MASTER PRO is a local-first enterprise data intelligence platform available as a Python SDK, Rich CLI, Model Context Protocol (MCP) Server, and Interactive SaaS Web UI. It automatically analyzes complex, messy, and large-scale Excel and tabular datasets, detects 13 distinct business rule and data quality errors, cleans records safely with user confirmation and full undo history, merges multiple files via intelligent column mapping, and exports client-ready Professional PDF, Interactive BI HTML, and Formatted Excel packages in a single click or command.


Related MCP server: precis-mcp

✨ Key Features

1. Python SDK, CLI & AI Agent (MCP) Integration (excel_master/)

  • Programmatic Python SDK (import excel_master): Clean, modular API (inspect, detect_errors, clean, export_report) to embed automated spreadsheet validation, cleaning pipelines, and reporting into any Python workflow without UI overhead.

  • Command-Line Interface (excel-master): Terminal-native commands (inspect, audit, clean, report, ui, mcp) built with Rich summary tables and headless batch execution.

  • Model Context Protocol (MCP) Server: Built-in MCP server (excel-master mcp) exposing spreadsheet inspection, error detection, cleaning, and report generation tools directly to AI agents (Claude Desktop, Cursor, Antigravity, etc.).

2. Linear / Raycast-Inspired Obsidian SaaS BI Dashboard (ui/, dashboard/, utils/i18n.py)

  • Bilingual Interface (EN / TR Switcher & URL Routing): Instant one-click switching between English (EN) and Turkish (TR) across the categorized sidebar, persistent topbar, onboarding flow, smart column detection headers, and executive overview β€” supporting ?lang=en and ?lang=tr URL query parameters.

  • High-Craft Dark Obsidian SaaS Interface: Built with an ultra-clean monochrome dark palette (#09090B / #121215), subtle hairline borders (#27272A), monochrome SVG icons, and a unified single-card drag-and-drop upload zone.

  • Categorized 11-Module Left Sidebar:

    • WORKSPACE: Overview, Data Preview, Data Quality

    • DATA ENGINE: Error Detector, Auto-Cleaning, Data Analysis, Charts

    • OPERATIONS: Reporting, Batch Processing, Action History, Settings

  • Persistent Topbar & Comparative KPIs: Displays active file name, row Γ— column dimensions, worksheet selector, quick file upload trigger, one-click Generate Report button, and 6 Before/After KPI cards (Total Records, Total Columns, Missing Data Rate, Duplicate Records, Detected Errors, Data Quality Score).

3. Advanced File Ingestion & Smart Column Detection (core/file_reader.py, core/column_detector.py)

  • Supported Formats: XLSX, XLS, XLSM, ODS, CSV, TSV, TXT, JSON, Parquet.

  • Smart Header & Column Inference:

    • Automatically resolves shifted headers (not located on the first row), merged cells, and two-tier (parent group + sub-header) Excel headers.

    • Assigns temporary identifiers (Col_1, Col_2, ...) to headerless files without dropping the first data row, inferring semantic column types (Email, Phone, National ID, Date, City, Country, Gender, Status, Order/Customer ID, Full Name, Amount, Quantity) from cell contents.

    • Prompts the user for confirmation whenever prediction confidence is low; never hallucinates or fabricates column names when true headers are unknown, preserving temporary names and notifying the user.

4. Automated Error Detector (core/error_detector.py, ui/error_detector.py)

Automatically scans datasets across 13 core data quality and business rule error classes:

  1. Malformed date formats

  2. Invalid email addresses

  3. Invalid phone numbers

  4. Duplicate customer records

  5. Negative stock quantities

  6. Unexpected price values (<= 0)

  7. Missing required fields

  8. Inconsistent categories (casing, whitespace, and typo variants)

  9. Text values in numeric columns

  10. Statistical outliers (IQR)

  11. Corrupted or malformed column names

  12. Data type mismatches

  13. Logical inconsistencies (Start Date > End Date, Quantity Γ— Unit Price β‰  Total Amount, invalid age or percentage values)

  • Displays Severity Level (Critical / High / Medium / Low), affected record count, sample values, recommended remediation, and an Auto-Fix Confidence Score (0–100%) for every detected issue.

  • Provides a row-level Before & After Comparison preview; destructive actions (row deletion or overwriting) are never executed without explicit user approval.

5. One-Click Professional Report Generation (ui/reports.py, exporters/)

Client-ready deliverables generated in a single batch via the Web UI, CLI, SDK, or MCP:

  • Professional PDF Analysis Report (.pdf): Cover page, file metadata, KPI cards, data quality score, missing value analysis, error detector breakdown, outlier analysis, statistical summary, high-resolution charts, chart commentary, pre/post-cleaning comparison, and overall evaluation (with full UTF-8 / Turkish character support).

  • Interactive HTML Dashboard (.html): Self-contained, offline-capable SaaS BI visual analytics report.

  • Cleaned Excel Workbook (.xlsx): Formatted output featuring conditional formatting, auto-filters, frozen header panes, quality summary, audit log, and quarantine sheets.

  • Data Quality Report (.xlsx), Action History (.xlsx), Injection-Safe CSV (.csv), and a Single-File ZIP Package (.zip).

6. Multi-Excel Batch Processing (core/batch_processor.py, ui/batch.py)

  • MODE 1 (Clean & Report Separately): Analyzes and safely cleans multiple files individually, generating dedicated Excel + HTML + PDF reports for each workbook.

  • MODE 2 (Smart Map & Merge into Master Table): Automatically aligns synonymous columns across disparate files (müşteri_adΔ±, müşteri adΔ±, Customer Name β†’ Customer Name), merging them into a unified table upon user confirmation while preserving source lineage (Source_File).

  • Fault Isolation: A corrupted or unreadable file never halts processing for the rest of the batch; all outputs are delivered via a summary dashboard and a consolidated ZIP archive.


πŸ—‚οΈ Project Architecture

excel_master_pro/
β”œβ”€β”€ app.py                     # Main Streamlit entry point (EN/TR switcher, categorized sidebar + Topbar)
β”œβ”€β”€ pyproject.toml             # Package metadata, dependencies & `excel-master` CLI entrypoint
β”œβ”€β”€ config.py                  # Centralized SaaS BI configuration and Obsidian color palette
β”œβ”€β”€ run.bat                    # Windows one-click isolated venv setup & auto-browser launcher
β”œβ”€β”€ excel_master/
β”‚   β”œβ”€β”€ __init__.py            # Public Python SDK exports
β”‚   β”œβ”€β”€ api.py                 # High-level programmatic SDK functions
β”‚   β”œβ”€β”€ cli.py                 # Rich-powered CLI (`inspect`, `audit`, `clean`, `report`, `ui`, `mcp`)
β”‚   └── mcp_server.py          # Model Context Protocol (MCP) tool server for AI agents
β”œβ”€β”€ core/
β”‚   β”œβ”€β”€ file_reader.py         # Multi-format, multi-row/shifted-header ingestion engine
β”‚   β”œβ”€β”€ file_validator.py      # Extension, magic-byte, zip-bomb, and macro validation
β”‚   β”œβ”€β”€ column_detector.py     # Type inference, content-based header detection & canonical mapping
β”‚   β”œβ”€β”€ error_detector.py      # 13-rule Automated Error Detector & Before/After preview
β”‚   β”œβ”€β”€ cleaning_engine.py     # Recommendation, approval, quarantine & undo-safe cleaning engine
β”‚   β”œβ”€β”€ batch_processor.py     # Multi-file MODE 1 & MODE 2 batch processing engine
β”‚   β”œβ”€β”€ anomaly_detector.py    # IQR, MAD Z-score, Isolation Forest & integrity checks
β”‚   β”œβ”€β”€ data_profiler.py       # Column-level statistical and structural profiler
β”‚   β”œβ”€β”€ data_analyzer.py       # Data quality scoring and correlation analysis
β”‚   β”œβ”€β”€ data_transformer.py    # Column operations, safe AST formulas, pivot & DuckDB SQL
β”‚   └── file_comparator.py     # Two-table/file comparison and diff analysis
β”œβ”€β”€ dashboard/
β”‚   β”œβ”€β”€ kpi_generator.py       # 6 core KPI card generator with Before/After delta tracking
β”‚   β”œβ”€β”€ chart_generator.py     # Priority-ranked BI charts, gauges & quality heatmaps
β”‚   └── dashboard_builder.py   # Smart analytical insights, category shares & dashboard assembler
β”œβ”€β”€ exporters/
β”‚   β”œβ”€β”€ pdf_exporter.py        # 12-section enterprise PDF analysis report generator
β”‚   β”œβ”€β”€ html_exporter.py       # Standalone interactive SaaS BI HTML dashboard exporter
β”‚   β”œβ”€β”€ excel_exporter.py      # Formatted XlsxWriter workbook & diff report exporter
β”‚   └── csv_exporter.py        # Formula-injection-protected CSV exporter
β”œβ”€β”€ ui/                        # 11 localized Streamlit page modules, shared Topbar/CSS & session state
β”œβ”€β”€ utils/
β”‚   β”œβ”€β”€ i18n.py                # Centralized English/Turkish (EN/TR) localization & URL query routing
β”‚   β”œβ”€β”€ helpers.py             # Number, date, and formatting utilities
β”‚   β”œβ”€β”€ validators.py          # Input sanitization & safe filename guards
β”‚   β”œβ”€β”€ logger.py              # PII-masked application logging
β”‚   └── history.py             # SQLite action history persistence
└── tests/                     # Comprehensive Pytest suite covering Core, UI, SDK, CLI & MCP

πŸš€ Installation & Usage

1. Install Package

pip install -e ".[all]"

2. Launch Web UI

Windows (One-Click):

run.bat

Via CLI / Terminal:

excel-master ui

3. CLI Usage

# Inspect file structure, inferred column types, and quality score
excel-master inspect sales_data.xlsx

# Run the 13-rule error detector audit
excel-master audit sales_data.xlsx

# Clean dataset and export formatted workbook
excel-master clean sales_data.xlsx -o cleaned_sales.xlsx

# Generate full PDF + HTML + Excel report bundle
excel-master report sales_data.xlsx -o ./reports

# Start the MCP server for AI agents
excel-master mcp

4. Python SDK Usage

import excel_master as em

# Inspect & audit a messy spreadsheet
summary = em.inspect("sales_data.xlsx")
errors = em.detect_errors("sales_data.xlsx")

# Clean safely and export client-ready reports
cleaned_df = em.clean("sales_data.xlsx", output_path="cleaned_sales.xlsx")
em.export_report("sales_data.xlsx", output_dir="./reports")

5. Running Tests

pytest -v

πŸ›‘οΈ Security & Data Integrity Principles

  • Uploaded files are processed 100% locally on your machine; no data is ever transmitted to external networks.

  • Original files remain untouched and are automatically backed up under output/originals/.

  • No rows or columns are deleted without explicit user approval; modified or removed records are preserved in quarantine and can be restored anytime via Undo.

  • VBA macros inside .xlsm workbooks are automatically detected and strictly blocked from execution.

πŸ—ΊοΈ Roadmap (v2.3.0)

  • Zero-Configuration Autonomous Adaptation Engine (core/autonomous_engine.py): Automatically reconstruct shifted/multi-tier headers, normalize mixed TR/US currency and date formats, resolve transposed financial models, and quarantine unrecoverable rows without manual configuration.

  • One-Command Autopilot (excel-master auto): Clean raw workbooks and generate interactive HTML + PDF executive BI dashboards straight from messy layouts via CLI, Python SDK, and MCP.

  • Dynamic PDF Table Wrapping (exporters/pdf_exporter.py): Automatic text wrapping and dynamic column width allocation for wide tables.

Available Tools

4 tools
clean_spreadsheetA
DestructiveIdempotent

Repair data quality errors in a spreadsheet and save the cleaned file to output_path.

Overwrites any existing file at `output_path`. Optional `rules` can filter specific
operations or categories (e.g. ["drop_duplicates", "trim"]). When omitted, safe and
high-confidence repairs are applied automatically.

Args:
    file_path: Path to the source spreadsheet to clean.
    output_path: Destination path where the cleaned file will be written (overwrites if exists).
    rules: Optional list of specific cleaning rule identifiers to apply; defaults to all safe rules.

Returns:
    JSON string with before/after quality score delta, row counts, output path, and operation log.

Inputs: file_path (required), output_path (required), rules. Returns: result

generate_bi_reportA
DestructiveIdempotent

Generate an executive BI report (HTML dashboard, PDF analysis report, Excel workbook, or CSV).

Reads the dataset from `file_path`, computes statistical profiles and KPIs, and writes the
rendered artifact to `output_path`. Overwrites any existing file at `output_path`.

Args:
    file_path: Path to the source spreadsheet (.xlsx, .xls, .csv, .tsv, .json, .ods, or .parquet) to analyze.
    output_path: Destination file path where the generated report will be saved (overwrites if exists).
    format: Output report format; must be one of "html", "pdf", "xlsx", or "csv" (defaults to "html").
    lang: Report localization language; "en" for English or "tr" for Turkish (defaults to "en").

Returns:
    JSON string containing status, resolved `output_path`, `format`, `lang`, and `size_bytes`.

Inputs: file_path (required), output_path (required), lang, format. Returns: result

inspect_spreadsheetA
Read-onlyIdempotent

Inspect an Excel, CSV, TSV, JSON, ODS or Parquet spreadsheet without modifying it.

Detects column schema, calculates the 0-100 data quality score, and scans all
13 data quality & business-rule checks (invalid dates, emails, phones, negative stock,
outliers, duplicates, missing mandatory fields, type mismatches, logical contradictions)
with affected row indices and sample fixes.

Args:
    file_path: Path to the input spreadsheet (.xlsx, .xls, .csv, .tsv, .json, .ods, or .parquet).

Returns:
    Compact JSON string containing schema metadata, quality score, and detected issues.

Inputs: file_path (required). Returns: result

merge_spreadsheetsA
DestructiveIdempotent

Merge multiple spreadsheets with differing column names into one unified workbook.

Uses intelligent semantic column alignment (e.g. customer_name / musteri_adi / Customer Name),
preserves source file lineage (`Kaynak_Dosya`), cleans values prior to stacking, and saves
the unified table to `output_path` (overwriting any existing file at that path).

Args:
    file_paths: List of two or more input spreadsheet paths to align and stack.
    output_path: Destination path for the merged output file (overwrites if exists).

Returns:
    JSON string summarizing aligned columns, source files, and total merged row count.

Inputs: file_paths (required), output_path (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool maps to a clearly distinct phase of spreadsheet work: inspection is read-only, cleaning repairs in place to a new output, merging combines multiple files, and reporting produces a BI artifact. Overlap is minimal because the action and input shape differ substantially, and the descriptions reinforce the boundaries.

    Naming Consistency5/5

    All four tools follow a consistent verb_noun snake_case pattern: inspect_spreadsheet, clean_spreadsheet, merge_spreadsheets, generate_bi_report. The naming is predictable and readable with no mixed conventions.

    Tool Count5/5

    Four tools is well within the appropriate range and each corresponds to a distinct, useful operation in the spreadsheet workflow. There is no redundant or filler tool, and the surface feels intentionally scoped.

    Completeness4/5

    The set covers inspection, cleaning, merging, and reporting, which are core lifecycle operations for spreadsheet processing. Minor gaps remain, such as direct filtering/querying, row-level editing, or conversion between tabular formats beyond report output, but agents can work around these for most common tasks.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A comprehensive Model Context Protocol (MCP) server for SQLite database operations. This server enables AI assistants to interact with SQLite databases through a standardized interface.
      421 npm
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Local-first data quality validation for Excel/CSV: schema-aware checks with 10 zero-code constraint types (uniqueness, ranges, foreign keys and more) and row-level error reports.
      4
      3
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables small local models and other agents to read and query spreadsheet files locally, run SQL and cleaning, audit formulas, make Excel-correct edits, and generate branded dashboards with token-budgeted responses across selectable tool tiers.
      53 PyPI
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to deterministically profile, clean, normalize, and validate tabular data, including locale-aware numbers, dates, text encoding, IDs, and CSV/XLSX/JSON inputs, while flagging ambiguous values instead of guessing.
      6
      33 PyPI
      Business Source 1.1