The Problem Was Invisible Until It Wasn't

Cleanroom compliance testing follows a strict protocol. Engineers deploy particle counters at multiple locations across a room, collect readings at defined intervals, and then produce a report that documents every reading against ISO 14644 particle-count thresholds. The equipment does the measurement. Everything after that was manual.

The workflow when we were brought in looked like this: the particle counter machines exported raw XLS files, one per test location. An engineer would open each file, extract the readings, and manually build a chart in Excel. They'd then copy those charts into a Word document, write the analysis section, apply company branding, and export a PDF. Multiply that by six to twelve locations per site visit and you're looking at a four-hour task that runs every test cycle — just to document work the machines already did automatically.

The core insight: the machines were already producing structured data. Every chart, every table, every ISO threshold comparison — all of it was derivable from the XLS output. The engineer was just a manual translation layer between structured data and a formatted document.

What We Built

The pipeline is a single Python application. Drop one or more XLS files from the particle counter machines into the input directory, run the script, and retrieve a complete PDF compliance report on the other side. Zero manual steps in between.

Stage 1: Data extraction and validation

The XLS files from the particle counters have a consistent but quirky structure — metadata headers, irregular column spacing, and particle readings across multiple worksheets. We wrote a parser using openpyxl that reads each file, extracts the location identifier, test timestamps, and particle counts per size class (0.5µm, 1.0µm, 5.0µm), and normalises everything into a clean dataframe. It also flags any readings that breach ISO 14644 Class 7 or Class 8 limits so the report can highlight them automatically.

Stage 2: Chart generation

Each location gets its own particle-count chart using matplotlib. The charts follow GTSCO's visual standards — specific colours for each particle size class, horizontal threshold lines at the ISO limits, and a consistent axis scale across all locations so engineers can compare sites at a glance. Charts are exported as high-resolution PNGs and kept in a temp directory until the report assembles them.

Stage 3: Report assembly

The report is assembled using python-docx from a branded GTSCO template. The pipeline populates the cover page, inserts the site metadata table, drops each chart into its designated section, writes the ISO compliance summary table, and fills in the pass/fail conclusion per location. The template handles all the branding — fonts, colours, logo placement, headers and footers — so the engineer never touches the document.

The final step converts the Word document to PDF using LibreOffice in headless mode, which runs on the same machine and produces a print-ready file within seconds.

The Numbers

  • Previous time per report cycle: 3–5 hours of manual work
  • Time with the pipeline: under 4 minutes end-to-end
  • Human error rate on ISO threshold comparisons: eliminated (it was the most common source of rework)
  • Time from project kick-off to first production run: 11 days

What This Pattern Looks Like Elsewhere

The GTSCO pipeline is one instance of a pattern that shows up constantly in UAE industrial and compliance businesses: structured machine output, manual human translation into a document, repeated at scale. The same pattern applies to equipment calibration logs, safety inspection reports, environmental monitoring records, and financial reconciliation summaries.

If your team has a workflow where someone takes a data export from one system and manually formats it into a report or document, that workflow can almost certainly be automated. The machines are already doing the hard work — the engineer in the middle is just a translation layer that shouldn't exist.

If you have a similar problem — structured data that needs to become a consistent document at scale — transmit the parameters and we'll scope it for you.