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.
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-workaroundRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install excel-heredoc-workaround in Claude Code
git clone --depth 1 https://github.com/HKUDS/OpenSpace /tmp/OpenSpace && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/OpenSpace/benchmarks/gdpval/skills/excel-heredoc-workaround ~/.gemini/antigravity-cli/skills/excel-heredoc-workaroundAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install excel-heredoc-workaround in Antigravity CLI
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
ANo 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 →Creates importable JSON templates for the Obsidian Web Clipper. It is for users who want to clip a site, understand the available variables, or format clipped content.
Harness Creator builds, audits, and improves the instruction and state files that help AI coding agents stay reliable across sessions. It is for developers whose agents forget context, drift out of scope, or claim work is done too early.
Guides an assistant through extracting text from scanned PDFs, photographed pages, and images with OCR. Covers backends, language packs, force-OCR, and performance tuning.
Edits a named local file in place to remove AI-writing patterns, using minimal targeted changes and post-edit verification. Built for users who explicitly ask to clean, rewrite, or humanize that specific file.
Polishes, translates, or tightens existing academic manuscript prose while preserving facts, terminology, and evidence boundaries. Made for researchers revising drafts, including Chinese-to-English translation and LaTeX layout fixes.
Adds PDF form analysis and filling, table extraction, OCR, validation and batch processing to an AI assistant. Aimed at developers who run complex or high-volume PDF workflows.
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.
