Skip to content

Instantly share code, notes, and snippets.

@towony
towony / parse_xlsx.php
Last active July 2, 2022 09:35 — forked from searbe/parse_xlsx.php
Parse simple XLSX in PHP with SimpleXML and ZipArchive
<?php
/**
* I had to parse an XLSX spreadsheet (which should damn well have been a CSV!)
* but the usual tools were hitting the memory limit pretty quick. I found that
* manually parsing the XML worked pretty well. Note that this, most likely,
* won't work if cells contain anything more than text or a number (so formulas,
* graphs, etc ..., I don't know what'd happen).
*/