
Splitting One Excel Sheet Into a Workbook per Group
Split one Excel sheet into a workbook per region or customer with pandas groupby, safe file names, formatting, a manifest and checks that the parts add up.
Tag
590 posts

Split one Excel sheet into a workbook per region or customer with pandas groupby, safe file names, formatting, a manifest and checks that the parts add up.

Combine hundreds of Excel files into one table with Python: glob, read each sheet, check headers, add the source name, quarantine bad files and verify counts.

Build a weekly Excel report with Python: query the database, write the workbook, email it and schedule it with cron, with paths, logs, locks and failures.

Office Scripts automate Excel on the web with TypeScript. Record an action, edit the code, run it from Power Automate on a schedule, and know its limits.

Run Python from an Excel button with xlwings: install, quickstart, RunPython and RunPython, read and write ranges, user defined functions and the limits.

fast-xml-parser returns objects, but its defaults drop attributes and turn 007 into 7 and 29.50 into 29.5. Set the options, validate, and see the 4.4 s cost.

DOMParser reads XML in the browser but reports errors as a parsererror element, not an exception. Query with XPath, handle namespaces, compare with HTML mode.

Parse XML in Ruby with Nokogiri: xpath and at_xpath, BigDecimal for money, namespaces, strict versus lenient parsing, the noent option and Reader streaming.

Read XML in PHP 8.5 with SimpleXML, DOMXPath and XMLReader, avoid the boolean cast trap, handle namespaces and read parse errors with libxml_get_errors.

Read XML into Rust structs with quick-xml and serde, stream 200,000 orders in 0.09 seconds, and see how bad booleans and mismatched tags are reported.

Unmarshal XML into Go structs with tags, use a pointer for absent versus empty, catch bad booleans, and stream 200,000 orders in 0.8 seconds.

XmlSerializer writes xsi and xsd namespace declarations and a utf-16 header by default. Remove them, control attributes and lists, and see what it ignores.