← Back to Skills Marketplace
xuanguan2020

csv to excel

by xuanguan2020 · GitHub ↗ · v1.0.0
cross-platform ✓ Security Clean
1551
Downloads
0
Stars
14
Active Installs
1
Versions
Install in OpenClaw
/install csvtoexcel
Description
Convert CSV files to professionally formatted Excel workbooks with Chinese character support, automatic formatting, and multi-sheet capabilities. Use when us...
README (SKILL.md)

\r \r

CSV To Excel Converter\r

\r

Overview\r

\r This skill enables conversion of CSV files to Excel format with professional formatting, proper encoding handling for Chinese characters, and support for combining multiple CSV files into a single Excel workbook with separate sheets.\r \r

Quick Start\r

\r Use the csv_to_excel.py script for all conversions:\r \r

# Single CSV to Excel\r
python scripts/csv_to_excel.py input.csv output.xlsx\r
\r
# Multiple CSVs to one Excel (each becomes a sheet)\r
python scripts/csv_to_excel.py file1.csv file2.csv file3.csv --output combined.xlsx\r
\r
# With custom sheet names\r
python scripts/csv_to_excel.py sales.csv inventory.csv --output report.xlsx --sheet-names "销售数据" "库存数据"\r
```\r
\r
## Features\r
\r
### Automatic Encoding Detection\r
- Detects CSV encoding automatically (UTF-8, GBK, GB2312, UTF-8-SIG)\r
- Ensures Chinese characters display correctly in Excel\r
- No manual encoding specification needed\r
\r
### Professional Formatting\r
- **Header row**: Bold white text on blue background\r
- **Borders**: Thin borders around all cells\r
- **Column widths**: Auto-adjusted based on content (handles Chinese characters properly)\r
- **Frozen panes**: Header row frozen for easy scrolling\r
- **Alignment**: Headers centered\r
\r
### Multi-Sheet Support\r
- Combine multiple CSV files into one Excel workbook\r
- Each CSV becomes a separate sheet\r
- Custom sheet names supported\r
- Sheet names default to CSV filenames (max 31 characters)\r
\r
## Common Usage Patterns\r
\r
### Pattern 1: Single File Conversion\r
User says: "Convert this data.csv to Excel"\r
\r
```bash\r
python scripts/csv_to_excel.py data.csv data.xlsx\r
```\r
\r
### Pattern 2: Multiple Files to Multi-Sheet Excel\r
User says: "Combine these CSV files into one Excel, each file as a separate sheet"\r
\r
```bash\r
python scripts/csv_to_excel.py sales_2024.csv sales_2025.csv inventory.csv --output report.xlsx\r
```\r
\r
Result: `report.xlsx` with 3 sheets named "sales_2024", "sales_2025", "inventory"\r
\r
### Pattern 3: Custom Sheet Names\r
User says: "Create an Excel with these CSVs and name the sheets in Chinese"\r
\r
```bash\r
python scripts/csv_to_excel.py q1.csv q2.csv q3.csv q4.csv --output 年度报告.xlsx --sheet-names "第一季度" "第二季度" "第三季度" "第四季度"\r
```\r
\r
### Pattern 4: Handling Chinese Content\r
User says: "This CSV has Chinese text and it shows as garbled characters in Excel"\r
\r
The script automatically detects encoding and handles Chinese characters:\r
```bash\r
python scripts/csv_to_excel.py 中文数据.csv 输出.xlsx\r
```\r
\r
## Technical Details\r
\r
### Encoding Support\r
The script tries these encodings in order:\r
1. UTF-8\r
2. GBK (common for Chinese Windows)\r
3. GB2312 (simplified Chinese)\r
4. UTF-8-SIG (UTF-8 with BOM)\r
5. Latin1 (fallback)\r
\r
### CSV Dialect Detection\r
- Automatically detects delimiter (comma, semicolon, tab, etc.)\r
- Handles quoted fields\r
- Works with various CSV formats\r
\r
### Column Width Calculation\r
- Chinese characters counted as 2 width units\r
- ASCII characters counted as 1 width unit\r
- Maximum width capped at 50 for readability\r
- Adds 2 units padding for visual comfort\r
\r
## Dependencies\r
\r
The script requires `openpyxl`:\r
\r
```bash\r
pip install openpyxl\r
```\r
\r
## Troubleshooting\r
\r
**Issue**: Chinese characters still appear garbled\r
- **Solution**: The CSV file may have a rare encoding. Try converting the CSV to UTF-8 first using a text editor.\r
\r
**Issue**: Sheet name error\r
- **Solution**: Excel sheet names must be ≤31 characters. The script auto-truncates, but you can specify shorter custom names.\r
\r
**Issue**: Empty sheets created\r
- **Solution**: Check that CSV files are not empty and are properly formatted.\r
\r
**Issue**: Script not found\r
- **Solution**: Run the script from the skill directory or use the full path: `python .kiro/skills/csv-to-excel/scripts/csv_to_excel.py`\r
Usage Guidance
This skill appears coherent and implements only CSV-to-Excel conversion. Before using: (1) install openpyxl from a trusted source (pip install openpyxl) in a virtual environment; (2) only point the script at CSV files you trust (the script will read files you pass it); (3) be cautious about where you write the output file—avoid system directories that require elevated permissions; (4) if you need higher assurance, review the included csv_to_excel.py yourself or run it in an isolated environment. No network or secret-exfiltration behavior was found.
Capability Analysis
Type: OpenClaw Skill Name: csvtoexcel Version: 1.0.0 The skill bundle provides a utility to convert CSV files to Excel, supporting multiple files, custom sheet names, and Chinese character encoding. The `SKILL.md` documentation accurately describes the functionality and provides legitimate usage examples without any prompt injection attempts. The `csv_to_excel.py` script uses standard Python libraries (`csv`, `pathlib`, `openpyxl`) for file reading, parsing, and Excel generation. All file operations are local and directly align with the stated purpose, with no evidence of data exfiltration, malicious execution, persistence mechanisms, or obfuscation. While any script accepting file paths as arguments could be vulnerable to path traversal if inputs are not sanitized by the calling environment, the script itself does not exhibit malicious intent or design to exploit such vulnerabilities.
Capability Assessment
Purpose & Capability
The name/description (CSV→Excel with Chinese support and formatting) aligns with the provided script and README. Required capabilities (encoding detection, formatting, multi-sheet output) are implemented in the script; no unrelated capabilities or credentials are requested.
Instruction Scope
SKILL.md instructs running the provided Python script with CSV paths and an output path. The script only reads the specified CSV files and writes the specified Excel file. It does not read other system files, environment variables, or send data externally.
Install Mechanism
There is no install spec; installation is manual via pip for the single declared dependency (openpyxl). That is proportional and expected for a Python script that writes Excel files.
Credentials
No environment variables, credentials, or config paths are required. The script only operates on files passed on the command line, which is appropriate for the stated purpose.
Persistence & Privilege
The skill is not marked always:true and does not modify other skills or system configuration. It has no persistent or privileged behavior beyond creating the requested Excel output file.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install csvtoexcel
  3. After installation, invoke the skill by name or use /csvtoexcel
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: CSV to Excel Converter with formatting and Chinese character support. - Added csv_to_excel.py script for converting single or multiple CSV files into Excel workbooks. - Professional formatting: auto-detects headers, applies bold colored header row, borders, and column width adjustment. - Handles Chinese and other non-ASCII characters; automatic encoding detection (UTF-8, GBK, GB2312, etc.). - Supports combining multiple CSVs into one Excel file, each as a separate sheet. - Allows custom sheet names, with compatibility for Excel's character limits. - Includes troubleshooting guidance and usage examples in documentation.
Metadata
Slug csvtoexcel
Version 1.0.0
License
All-time Installs 16
Active Installs 14
Total Versions 1
Frequently Asked Questions

What is csv to excel?

Convert CSV files to professionally formatted Excel workbooks with Chinese character support, automatic formatting, and multi-sheet capabilities. Use when us... It is an AI Agent Skill for Claude Code / OpenClaw, with 1551 downloads so far.

How do I install csv to excel?

Run "/install csvtoexcel" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is csv to excel free?

Yes, csv to excel is completely free (open-source). You can download, install and use it at no cost.

Which platforms does csv to excel support?

csv to excel is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created csv to excel?

It is built and maintained by xuanguan2020 (@xuanguan2020); the current version is v1.0.0.

💬 Comments