John Beales · @johnbeales
19 followers · 156 posts · Server universeodon.com

I discovered a crazy bug today trying to import data from an Excel file into a Laravel app.

Modern Excel files are actually zip files containing several XML files in a specific directory structure, but it seems that within the zip file the "directory structure" is not real, so each XML file just has some directory structure like stuff prepended to its file name.

In the particular Excel file I'm importing, the XML file that knows about the different worksheets in the Excel workbook was saved with the "/" characters in its directory structure as backslashes. This seems very unexpected, none of the Excel packages I tried for PHP could read it.

In the end I used PHP's built-in ZipArchive class to rename the XML file in the Excel archive, then it could be imported properly.

That wasn't how I expected to spend my afternoon!

#untrusteddata #php #dataingestion #weirdbugs #developerlife

Last updated 1 year ago

Alex Jimenez · @AlexJimenez
225 followers · 1297 posts · Server mas.to
OpenBiblioJobs · @obj
275 followers · 11257 posts · Server openbiblio.social

Informationsspezialist*in (m/w/d), TV-L E 13, Vollzeit, auf 2 Jahre befristet Leibniz-Institut für Psychologie (ZPID) | Bewerbungsfrist: 01.10.2022 leibniz-psychology.onlyfy.jobs | jobs.openbiblio.eu/stellenange

#dspace #openaccess #Repositorium #dataingestion #openbibliojobs

Last updated 2 years ago