Think Build Implement Repeat
London, UK +44 7367 067226
WhatsApp FOLLOW f in X
Python & Django

Automating the Workbook That Runs the Business

Last updated:

They are load-bearing more often than admitted

Plenty of profitable businesses run a core process in a shared workbook. Automating around it — reading from it, writing to it, validating it — is frequently more useful than replacing it.

That approach requires nobody to change how they work, which is why it is adopted where a replacement would not be.

What makes them awkward

  1. Merged cells that break row alignment
  2. Several tables on one sheet with blank rows between
  3. Headers repeated partway down
  4. Numbers stored as text, or with stray characters
  5. Dates in several formats within one column
Code that assumes a clean rectangular table with one header row will work on the sample file and fail on the real one. Every time.

Validate as you read

  • Check the expected columns exist, by name rather than position
  • Check types — a number column containing text is a signal
  • Check ranges — dates and amounts within plausible bounds
  • Check the row count against expectation
  • Report anything unexpected rather than processing it

Writing back

Writing to a workbook people also edit is where problems arise: someone has it open, formulas get overwritten, formatting is lost.

Prefer writing to a separate output file, or to a dedicated sheet nobody edits by hand. Overwriting a workbook someone is working in is a good way to lose a morning's work.

When to move on from spreadsheets

SignalMeaning
Several people editing simultaneouslyYou need a database
Versions with different totalsNo single source of truth
Formulas nobody understandsAccumulated risk
Over about 20,000 rowsPerformance and errors will rise
Everyone sees everythingA permissions problem

Two or more of those and a proper system is worth pricing. Fewer, and automating around the spreadsheet is the cheaper answer.

Frequently asked questions

Which library should we use?

The established options handle the common formats well. What matters is the validation you build around them.

Can it work with cloud spreadsheets?

Yes, through their APIs, which is considerably better than file handling. Moving to a cloud spreadsheet is frequently the cheapest first step.

What about formulas?

Reading calculated values is usually what you want. Writing formulas programmatically is possible and frequently more trouble than it is worth.

Should we replace the spreadsheet?

Automate around it first. If the signals above apply, price a replacement as a separate decision.

Keep reading

A workbook that runs your business?

Automating around it is usually cheaper than replacing it. Tell us how it is used.

Book a free 30-minute call Get a project estimate WhatsApp us

Related services

What we build for problems like this one

Custom Software DevelopmentWeb DevelopmentMachine Learning