ARDHOLT Excel & VBA Casebook · all cases

Combine monthly shop files

Separate shop spreadsheets, with columns in different orders. Bring them into one table, then refresh without doubling the figures.

50 files: 46 filled, 2 empty, 2 rejected. 1 temporary file ignored, outside the 50.

Finished combined table: 2025-01-01, amount 9.08 from 01_2025-01_B01.xlsx; 2025-01-01, amount 9.79 from 02_2025-01_B02.xlsx.

Two entries from the finished table, with their original source rows. Download the finished spreadsheet.

Case 8 of 8 in Excel & VBA casebook

What was wrong

What I did

Proof

The opening table shows one entry from each of the first two shop files, with their original values retained. Open the full combined spreadsheet to see all 5,520 rows.

What was checked What happened
All the shop files 50 files: 46 filled, 2 empty, 2 needing fixes
Files needing fixes One is missing the amount column; one is missing the data sheet
Temporary editing file 1 ignored; separate from the 50 shop files
Entries brought together 5,520 rows; amounts add up to 238,441.92
Update again Still 5,520 rows, with every value unchanged
Add a file containing another entry 5,521 rows, matching the enlarged source folder

Download: original shop files · finished spreadsheet · files needing attention · workbook with the update macro.

Watch the recorded refresh replay

RefreshFolder runs: 0 to 5,520 rows; run again: 5,520 to 5,520; add one row and run: 5,520 to 5,521.

Replay of the recorded refresh log, rather than an application screen recording. Still image.

Developer details: reproduce the results and inspect the checks

Try it yourself

Optional technical check for a developer, from this folder with Docker running:

./run.sh

It starts in a fresh results folder, keeps the sources read-only, checks the results and prints PASS: combine checks plus the results path. Developer setup and file requirements.

How it is tested

Tests

Run in: LibreOffice Calc 24.2.7.2 (headless), the macro checked against an independent Python reference.

Passing tests check row counts, amount totals, every source value and unchanged input files. They cover reordered columns, extra fields, empty and invalid files, temporary files, repeat updates and a newly added file. The actual VBA run matched the reference cell by cell; its saved workbook used UNO export rather than VBA SaveAs.

The refresh animation is a replay of events captured around those macro calls, not an application screen recording. The run starts with an empty table. It refreshes twice, then refreshes a temporary copy of the source folder with one extra entry. Every result is compared with the Python reference. Launcher tests use a Docker command double to check read-only mounts and fresh destinations; the full demo pipeline is also run in a fresh folder inside the Linux container.

For the developer checking the implementation: tests · VBA source · versions and execution evidence.


£39 fixed as one task automated, 5 working days. This covers one shared folder-to-table setup across your shops. I confirm the files and layout through the platform before starting.

Contact me through the platform where you found this case.

For work beyond that setup, I quote any difference in writing before I start.