Hauler Report Generator
Excel in, per-driver reports out — no server needed.
Overview
A browser-based tool for a molasses trucking operation that ingests a monthly trip summary Excel file and produces formatted per-driver Excel reports. It parses manifest weight vs. delivered tonnage per trip, computes variance and shortage, and outputs one worksheet per driver plus a ranked efficiency summary sheet. Entirely client-side — no data leaves the browser.
Automates splitting a consolidated monthly hauler trip sheet into individual driver reports. Each driver gets a formatted Excel sheet with their trips, MW vs. outturn tonnage, variance colored red or green, and signature lines for certifying accuracy.
Entirely client-side: ExcelJS parses the uploaded workbook in the browser, groups rows by driver and truck number, and writes a new workbook to a Blob URL for download. No data ever leaves the user's machine.
Chose a zero-backend approach to keep infrastructure nonexistent — deployed as a static Cloudflare Pages site with a thin Cloudflare Worker for security headers. Cell styling (fonts, borders, number formats, merged title cells) is handled programmatically to match the client's existing report format.
The generated workbook contains one sheet per driver named by surname and truck number, sorted alphabetically, plus a RANKING sheet that orders all drivers by total variance — least variance first — for at-a-glance efficiency comparison.
Stack
UI / Frontend
Infra / Deploy
How it works
Upload
User drops or selects a .xlsx summary file. App validates the extension and reads the ArrayBuffer via FileReader.
Parse
ExcelJS loads the workbook, finds the sheet whose name contains a month name, locates the header row by checking for CLIENT/DRIVER/MW columns, then maps every data row into a TripRow object with variance = tonnage − MW.
Group
Trips are grouped by driver+truck key into DriverGroup objects, accumulating totalVariance per group.
Preview
App shows a table of all drivers sorted by variance. User enters Prepared By and Certified Correct names.
Generate
ExcelJS builds a new workbook: one styled worksheet per driver with trip rows, totals, and signature lines, plus a RANKING sheet. The buffer is written to a Blob and triggered as a browser download.