Introduction: XLSX Reader without Classes – functional, simple, transparent
Over the past few days I’ve collected some answers and code examples on the topic of Excel import without having Excel installed and summarized them in a PDF.
My main thought:
Does this really need to be a class?
From my perspective, not necessarily. In teams I often see that hardly anyone touches or overrides a class. In the end, usually only the original author fully understands what’s happening inside.
A functional approach is often simpler:
More transparent: each function does exactly one thing (e.g., unzip XLSX, load sharedStrings, iterate sheet).
Easier to maintain: no hidden state, no inheritance.
Team-friendly: contributors can immediately plug in their own logic, for example via callbacks.
Expandable: if more is needed (merged cells, large files, styles), you can extend specific functions — without having to understand a complex class structure.
In practice these building blocks cover 90% of common use cases:
Load and unzip XLSX
Iterate through cells
Validate or transform values
Output as CSV or insert directly into SQL
All based on simple functions + hashes/arrays.
In my view, this is a better default than a class: clearer, easier to maintain, and less fragile for collaboration.
Best regard,
Otto
https://clipper2web.com/php/importxlsto ... mputer.pdf