AutomationLogistics operationsMay 2025

Turn routing exports into ready-to-use run sheets. Automatically.

Every week, a routing export arrives with everything the operations team needs to build driver run sheets and pack sheets. This automation reads the export, applies correct sorting and formatting, and writes the result directly into the pre-made template — without touching the conditional formatting rules the team relies on.

Manual formatting work that happened every single week.

Time lost every week

Five hours a week, every week. Two hours exporting and formatting run sheets, two hours on PTL files, an hour on SMS data — all of it done by hand before the working day had started.

Broken formatting

Pre-made templates relied on conditional formatting rules that made run sheets readable for drivers. Manual edits regularly broke those rules, producing sheets that needed additional repair.

Pack day complexity

Some deliveries span multiple pack days, making sort order non-trivial. Manual sorting produced inconsistent results depending on who processed the file that week — across 50 to 100 sheets, 4 PTL files and 6 SMS files every week.

The template problem

Logistics teams build their run sheets around templates — pre-formatted Excel files where conditional formatting rules make routes readable at a glance. The problem with writing to these templates manually is that Excel's formatting is fragile. A paste into the wrong cell, a column width change, or an accidental format clear breaks the rules that make the sheet work.

This automation uses openpyxl to write data into the correct cells without touching the template's formatting layer. The template stays intact. The conditional rules survive. The output looks exactly as designed — every time.

Run Sheet — Monday
SeqPack DayCustomerSuburbTypeNotes
01Mon AMJane DoeKardinyaDeliveryLeave at front
02Mon AMJane DoeMelvilleDelivery—
03Mon AMJane DoeBooragoonDeliveryCall on arrival
Mon PM
04Mon PMJane DoeApplecrossWPFR—
05Mon PMJane DoeArdrossDelivery—
Formatted run sheet — sorted by pack day, sequence assigned, template formatting preserved.

What makes the sort non-trivial

A simple sort by suburb or customer name doesn't work when deliveries span multiple pack days. A Monday-packed order that delivers Tuesday has different sequencing requirements than a Monday delivery — and those rules compound across regional runs, pickup routes, and combined pack days.

The automation encodes these rules explicitly, producing a consistent sort order regardless of who runs it. The operations team gets the same output shape every week, which means drivers know what to expect and pack room staff can work to a predictable structure.

Sort logic applied

Pack day

Primary grouping — Mon AM before Mon PM

Delivery type

Standard deliveries before pickup routes

Route sequence

Stops ordered within each pack group

Edge cases

Combined pack days resolved deterministically

Four steps. Same output every week.

01

Read routing export

Load the raw routing data from the export file — stops, customers, delivery types, and pack day information.

02

Clean and sort

Apply robust sorting rules for combined pack days. Normalise field formats and resolve edge cases that trip up manual processing.

03

Write to template

Populate the pre-made Excel template — sequence, pack day groupings, customer fields, and driver notes — without touching the conditional formatting rules.

04

Ready to use

Run and pack sheets land in the output location, correctly formatted and sorted, ready for the team before the working day begins.

Technologies used

Python
pandas
openpyxl

Have a manual weekly process that produces the same output every time?

Let's automate it — consistent output, no formatting rework, and time back for the people who matter. It also stops being a problem as you grow: the hundredth sheet takes the same time as the first, and it has been running every week since mid-2025.

Let's talk →