Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Stripping Excel Pivot Caches, Bank Memos, and PII Inside a Single Offline HTML File

Deleting the email and phone columns in Excel before sharing a spreadsheet rarely makes it safe. When I started inspecting real e-commerce and ERP exports (Shopify, Amazon, TikTok Shop, bank statements), four leaks showed up repeatedly even after people manually scrubbed customer columns: Excel hidden residue : xl/pivotCache/ XML files still hold cached source records from deleted columns;…

The article details a method for securely sanitizing Excel files and bank memos by stripping out sensitive information. Despite people manually deleting columns like email and phone, Excel files often retain traces of deleted data, such as hidden cache files and workbook properties. This problem extends to bank statements, where transfer descriptions can still reveal account information and other sensitive data.

Additionally, commercial identity information, such as store names, SKU codes, and revenue totals, may still be exposed even after customer PII has been removed.

To address these issues, the author created a zero-network, single-file HTML sanitizer. This tool enforces a strict Content Security Policy, blocking all network requests and limiting the file to run entirely offline. It then inspects Excel files, which are essentially ZIP archives, to remove hidden worksheet flags, comments, and pivot cache files before converting the contents to a CSV file. This process ensures that no residual data from deleted columns or formulas is included in the final export.

The sanitizer also maintains the integrity of accounting calculations by applying a local random scaling factor to all monetary values, keeping ratios and percentages intact. This allows analysts to examine data without exposing the actual revenue figures. The tool further encrypts a local key file containing the scaling factor using Web Crypto, employing a user passphrase to derive a 256-bit AES-GCM encryption key. The encrypted file is then stored locally, with decryption occurring only in memory upon restoration.

Finally, the tool performs a full-sheet verification pass to ensure that no sensitive information has been missed during the sanitization process. If any PII or other restricted data is found, the export is halted, and the remaining instances are listed for review. The entire sanitization and verification process typically takes less than a second, even when processing a large dataset of 50,000 rows.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

More from Dev.to on urgent.news

Get the news by email. Yesterday's most-covered stories, every morning.

See today's edition · More options

More in Tech

More from Saturday, 5 December 2026 →