Urgent.News

What's breaking now, across thousands of outlets.

Tech

Verify XLSX metadata cleanup with Python

An XLSX cleanup report can tell you which fields it changed. For a regression check, I also want to inspect the downloaded file itself. Did the chosen author and company fields become empty or disappear? Did the sheets, formulas, and other package parts keep the same bytes? This example uses a small demo workbook with fictional names, a custom ProjectCode , a formula, and a hidden sheet. The…

In the provided Python script, an XLSX file is inspected to verify the results of a cleanup process. The script reads two copies of the workbook, one original and one cleaned, and compares various elements to ensure the cleanup was successful. The script focuses on specific XML files within the XLSX package, which contain metadata and properties, such as the author, company, and custom fields.

The script hashes the contents of these XML files and compares them against the original to confirm no changes were made outside of the expected property paths. If any unexpected modifications are detected, the script alerts the user, ensuring the integrity of the workbook is maintained.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

A harness grown from losses

I almost never see the auto-compact warning in Claude Code. That is not a setting. I dislike what compaction does — the conversation is replaced by a lossy summary, and the nested instruction files do…

The black box doesn't delete the text

Draw a black rectangle over a name in a PDF, export the file, then reopen it with pdf.js and call getTextContent() . The name comes back. Word for word, character for character.

  • Black rectangle merely a drawing command, not removing text
  • Manual check button verifies redaction results
  • Tool reports zero characters for text remaining, non-zero for image

More from Sunday 8 November →