xlsx

Edit spreadsheet files to clean tabular data and verify Excel formulas.

Updated Jan 26, 2023
One-click install
npx skills add https://github.com/yuyalun-allen/dotfiles --skill xlsx-yuyalun-allen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xlsx
Source: https://github.com/yuyalun-allen/dotfiles/tree/main/tools/pi/agent/skills/xlsx
Command: npx skills add https://github.com/yuyalun-allen/dotfiles --skill xlsx-yuyalun-allen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openpyxl, defusedxml, lxml, and includes scripts (resource) components.

What problem does it solve?

Many tasks require working with spreadsheet files that are messy, inconsistent, or contain hardcoded values and broken formulas. This Skill helps users open, read, clean, restructure, and produce .xlsx/.xlsm/.csv/.tsv files while ensuring formulas remain dynamic and error-free.

Core Features & Use Cases

  • Reading & Conversion: Load spreadsheets and convert between .xlsx, .csv, and .tsv formats while preserving structure.
  • Cleaning & Restructuring: Detect and fix malformed rows, misplaced headers, junk data, and normalize tabular layouts into proper worksheets.
  • Formula-first Editing: Insert Excel formulas (not hardcoded results), maintain template conventions, and follow financial formatting and color conventions when requested.
  • Recalculation & Validation: Recalculate formulas using LibreOffice via scripts/recalc.py and verify there are zero Excel errors before delivering output.
  • Preserve Templates: When updating existing files, match existing formatting and conventions exactly and never override established templates.

Quick Start

Open the input file, clean malformed rows and headers, add required columns using Excel formulas (do not hardcode values), run scripts/recalc.py to recalculate and verify no formula errors, and save the workbook as output.xlsx.

Frequently Asked Questions about xlsx

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clean and fix malformed rows in an Excel spreadsheet?

To clean an Excel spreadsheet, you can detect and fix malformed rows, misplaced headers, and junk data, then normalize the tabular layout into a proper worksheet structure.

How do I convert CSV files to XLSX while preserving data structure?

You can convert CSV files to XLSX by loading the spreadsheet and exporting it to the desired format, ensuring the original tabular structure and data are preserved during the conversion.

Can I add Excel formulas instead of hardcoded values when editing XLSX files?

Yes, when editing XLSX files, you can insert dynamic Excel formulas rather than hardcoded values to maintain live calculations and follow existing template conventions.

Does openpyxl support recalculating formulas to verify zero errors in workbooks?

While openpyxl handles file editing, formula recalculation and validation to verify zero errors is performed via LibreOffice using a dedicated recalculation script.

What is the best way to update an existing XLSM file without breaking its template?

The best way to update an XLSM file without breaking its template is to match existing formatting and conventions exactly, ensuring established templates are never overridden.

Why do my spreadsheet formulas show errors after converting from TSV to XLSX?

Errors after converting from TSV to XLSX may occur if formulas are hardcoded or malformed; running a LibreOffice recalculation script validates the workbook and verifies zero formula errors.