2.5k
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill csvtoexcel- _meta.json280 B
- SKILL.md4.3 KB
Overview
This skill converts CSV files into professionally formatted Excel workbooks with full support for Chinese and other non-ASCII characters. It offers single-file conversion, multi-CSV to multi-sheet workbooks, and automatic formatting like headers, borders, and auto-adjusted columns. Use it to produce readable, presentation-ready Excel reports from raw CSV data.
How this skill works
The converter auto-detects CSV encoding (UTF-8, GBK, GB2312, UTF-8-SIG, with Latin1 fallback) and detects CSV dialects (delimiters, quoted fields). It reads each CSV and writes data to openpyxl Excel workbooks, applying a formatted header row, thin borders, frozen panes, alignment, and column widths that count Chinese characters as double-width and cap maximum width. Multiple CSVs become separate sheets with optional custom names.
When to use it
- Convert a single CSV into a polished .xlsx for sharing or presentation.
- Combine many CSVs into one Excel workbook with each file on its own sheet.
- Fix garbled Chinese characters by using automatic encoding detection.
- Produce consistent Excel reports with header styling, borders, and frozen header row.
- Auto-adjust column widths (including Chinese text) to improve readability.
Best practices
- Provide meaningful sheet names; the script truncates to 31 characters if needed.
- If encoding issues persist, convert the CSV to UTF-8 before running the tool.
- Keep CSV files non-empty and consistently formatted to avoid empty sheets.
- Limit very long fields; column widths are capped for readability (max 50).
- Install and keep openpyxl up to date (pip install openpyxl).
Example use cases
- Convert sales.csv to sales.xlsx for a management presentation with formatted headers.
- Merge quarterly CSV exports into a single annual workbook with four sheets.
- Create an internal report from multiple CSV exports with Chinese sheet names.
- Fix CSVs exported with GBK encoding so Chinese characters display correctly in Excel.
- Produce a styled Excel deliverable from exported database CSVs for stakeholders.
FAQ
The script tests UTF-8, GBK, GB2312, UTF-8-SIG and falls back to Latin1 if needed.
How does multi-sheet output work?
Pass multiple CSV file paths and an --output filename; each CSV becomes a separate sheet, with optional --sheet-names to set names.
Why are column widths capped?
Widths are capped at 50 units to keep sheets readable and prevent excessive column stretching; padding and double-width counts for Chinese characters are applied.