
Reading Excel XML Spreadsheet 2003 Files With Python
The old Excel XML Spreadsheet 2003 format is plain XML with Worksheet, Row, Cell and Data elements. Read it with lxml, handle Index gaps and types.
Everything you need to level up your coding skills.

The old Excel XML Spreadsheet 2003 format is plain XML with Worksheet, Row, Cell and Data elements. Read it with lxml, handle Index gaps and types.

Turn orders with repeating items into a workbook a spreadsheet user can filter: one sheet per level linked by order id, or one wide sheet, plus the checks.

What happens when you open an XML file in Excel, the choices it offers, why leading zeros and long numbers change, and a safer route that keeps text as text.

Excel exports XML only through an XML map built from a schema. The 65,536 row cap, the constructs that block export, and a script that does the same job.

How Excel maps XML elements to cells with an XML map, what the XML Source pane does, how append and overwrite work, and why repeating data is the hard part.

How to get XML into a spreadsheet and back: XML maps, opening files, flattening, the 2003 format, scripts, types and the checks that catch silent loss.

Read a real public QuakeML feed from the USGS: two namespaces, nested value elements, depth in meters, magnitude types, and checks that catch a wrong unit.

Generate sitemap files from a PostgreSQL table with a streaming writer: 117,002 URLs in 0.6 seconds, split at 50,000 per file, with an index and validation.

Load an Atom feed into PostgreSQL by entry id with insert or update, read links, categories and html content correctly, and compare lxml with feedparser.

Five stylesheets that output nothing or the whole file as text, with the cause of each: a namespace, a built-in rule, an absolute path, and a literal id.

A working guide to XSLT 1.0, 3.0 and XQuery on the same files: templates, grouping, enrichment, JSON output, parameters, debugging, speed and which to pick.

One XML file and one task in eight languages, with each output, the defaults that change your data, and how each treats absent, empty and bad values.
We send one email when a new article is published. No spam.