Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

excel-heredoc-workaround

Skill by HKUDS

Creates styled .xlsx files with openpyxl. It tries execute_code_sandbox first and falls back to run_shell with an inline Python heredoc when the sandbox fails. Intended for assistants that need formatted spreadsheets.

  • Score 86
  • 8.1k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install excel-heredoc-workaround

Built from the published package, never by AI.

git clone --depth 1 https://github.com/HKUDS/OpenSpace /tmp/OpenSpace && mkdir -p ~/.claude/skills && cp -r /tmp/OpenSpace/benchmarks/gdpval/skills/excel-heredoc-workaround ~/.claude/skills/excel-heredoc-workaround

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install excel-heredoc-workaround in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This agent skill tells an AI assistant how to create Excel (.xlsx) files with the openpyxl library. It first tries execute_code_sandbox. If that fails with openpyxl-related errors, it switches to run_shell and runs an inline Python heredoc script that writes the workbook directly to disk.

The skill includes example code for bold headers with a colored background, alternating row colors, borders, alignment and automatic column widths. After saving, it suggests checking the file with ls and optionally reading it back with read_file. It is aimed at assistants that need styled spreadsheets, such as schedules or reports.

Written from the project's SKILL.md and checked against it.

What it can do

  • Sandbox first attemptTries execute_code_sandbox first to create the workbook with openpyxl.
  • Shell fallbackFalls back to run_shell with a Python heredoc when the sandbox fails.
  • Header stylingApplies bold white text on a colored background to header cells, centered.
  • Alternating row colorsApplies a gray fill to every other data row.
  • Borders and alignmentAdds thin borders to cells and centers their content.
  • Automatic column widthsSets each column width from the longest value in that column.
  • File verificationChecks the created files with ls -lh *.xlsx.
  • Read back checkUses read_file with filetype xlsx to confirm the file is valid.

What you need

  • Python 3 with the openpyxl library
  • A run_shell tool for the fallback path
  • An execute_code_sandbox tool for the first attempt

Try asking

  • Create an Excel schedule with styled headers and save it as Cleanup_Schedule.xlsx
  • Make a formatted Excel report with borders and auto-sized columns
  • Build a spreadsheet with alternating row colors and check the file was created

Good to know

  • The fallback path depends on run_shell being available.
  • Covers .xlsx files created with openpyxl only.
  • The sandbox is tried first, so the fallback runs only after a failure.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: benchmarks/gdpval/skills/excel-heredoc-workaround/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to excel-heredoc-workaround

All alternatives →

Compare with obsidian-clipper-template-creator, harness-creator or xberg-extracting-with-ocr

excel-heredoc-workaround: common questions

When should I use this instead of execute_code_sandbox?

Use it when execute_code_sandbox fails with openpyxl-related errors or when you need styling and complex spreadsheet features. The source says the shell route is more stable and gives full stdout and stderr.

Does it create formatted Excel files?

Yes. The examples cover bold colored headers, alternating row fills, borders, alignment and column widths.

How is the created file checked?

The skill runs ls -lh on the .xlsx files and can use read_file with filetype xlsx to confirm the workbook is valid.

How do I install excel-heredoc-workaround?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is excel-heredoc-workaround free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is excel-heredoc-workaround safe to use?

It scores 86 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to excel-heredoc-workaround?

Similar skills: obsidian-clipper-template-creator, harness-creator, xberg-extracting-with-ocr, file-edit-in-place.

excel-heredoc-workaround Install

Add to stack

Loading.