text-to-excel
Text-to-Excel
将结构化文本转换为格式规整的Excel文件。
Workflow
Step 1: Parse User Input
Analyze user-provided structured text. Supported input formats:
- Markdown tables (
| col1 | col2 |) - Plaintext tables (tab/space-separated)
- CSV/TSV data
- Lists (bulleted, numbered)
- Key-value pairs
- JSON/dict-like structures
- Free-form text with identifiable tabular structure
- Descriptions of desired table content
Identify: headers, data rows, data types per column, and any special formatting requests.
Step 2: Ask for Output Path
Ask the user for the save path. Suggest a reasonable default filename based on the content (e.g. ~/Desktop/sales_data.xlsx).
Step 3: Build JSON Config
Construct a JSON config object following the schema in references/config_schema.md.
Minimal example:
{
"sheets": [{
"name": "Sheet1",
"headers": ["Name", "Age", "City"],
"data": [
["Alice", 30, "Beijing"],
["Bob", 25, "Shanghai"]
]
}]
}
Full-featured example with styles, charts, and validation:
{
"sheets": [{
"name": "Sales",
"title_row": {"text": "Q1 Sales Report", "style": {"font": {"bold": true, "size": 16}}},
"headers": ["Month", "Revenue", "Growth"],
"data": [
["January", 50000, 0.12],
["February", 62000, 0.24],
["March", 58000, 0.16]
],
"column_types": ["text", "currency_cny", "percent"],
"freeze_pane": "A2",
"auto_filter": true,
"charts": [{
"type": "bar",
"title": "Monthly Revenue",
"x_column": 1,
"y_columns": [2],
"position": "E2"
}],
"conditional_formats": [{
"type": "color_scale",
"range": "B2:B4"
}]
}]
}
Step 4: Generate Excel
- Write the JSON config to a temp file
- Run:
python3 scripts/generate_excel.py <config.json> <output_path> - Verify the file was created
- Report success with the file path
Style Defaults
The script applies professional defaults automatically:
- Headers: Blue background (#4472C4), white bold text, centered
- Data rows: Alternating gray/white bands, thin borders
- Column widths: Auto-calculated based on content length
- Title row (optional): Large bold text, merged across all columns
Override any default by specifying header_style, data_style, or per-cell styles in the config.
Advanced Features
- Multi-sheet: Add multiple objects to the
sheetsarray - Merge cells: Use
merge_cellswith range strings or row/col objects - Freeze pane: Set
freeze_paneto e.g."A2"to freeze header row - Auto-filter: Set
auto_filter: trueto enable dropdown filters - Charts: Bar, line, pie, area, scatter charts — see references/config_schema.md
- Data validation: Dropdown lists, numeric ranges, date ranges, text length limits
- Conditional formatting: Cell-based rules, color scales, data bars
- Number formats: Predefined (
percent,currency_cny,currency_usd,date) or custom Excel format strings - Print settings: Orientation, paper size, fit-to-page
See full schema: references/config_schema.md
More from yipng05-max/-skills
literature-verifier
Verify the authenticity of literature references and detect hallucinations in both English and Chinese (中文) sources. Use when users need to check if a citation is real, verify a DOI, confirm a paper/article/book exists, cross-check author-title-journal-year metadata, detect fabricated references, validate URLs of online articles, or audit a reference list for accuracy. Covers journal papers, conference papers, preprints, books, monographs, newspaper articles, magazine articles, web articles, dissertations, government documents, and any other published works. Supports Chinese academic databases including CNKI (知网), Wanfang (万方), CQVIP (维普), Baidu Scholar (百度学术), and core journal list verification (北大核心, CSSCI, CSCD).
11cnki-advanced-search
>
11literature-review-writer
>
9feishu-paper-reviewer
飞书文档论文审阅工具。直接在飞书云文档上进行学术论文审阅,支持高亮、删除线、加粗变色、划词批注、插入审阅意见等多种修订标记。当用户提到对飞书文档/云文档进行论文审阅、审稿、评阅、修改批注,或提供飞书文档链接要求审阅时触发。关键词:飞书论文审阅、飞书审稿、云文档评阅、飞书批注论文。
9cjournal-analyzer
>
8paper-analyzer
学术论文结构化阅读、拆解与分析工具。基于12个阅读要素(研究背景、研究问题、研究结论、文献综合、文献批评、研究方法、理论视角与理论框架、一致性发现、不一致性发现、研究贡献、研究不足、未来研究展望)对论文进行深度拆解,结果保存为Excel文件。当用户提到需要针对论文/文献/paper进行拆解、解析、分析、阅读、梳理,并上传或告知一篇或多篇论文的本地文件路径(PDF、Word等)时触发此skill。
8