pptx
Create and edit slide decks, generate slides from templates, and extract text.
ANanthropics/skills203k2,822 new stars in the last 7 days
把 Excel 工作表转换成 JSON,支持 records、columns、values 三种结构,日期自动转 ISO 字符串。当用户提到 Excel 转 JSON、表格转接口数据、Excel 生成 mock 数据时使用。
把 Excel 转成程序能直接消费的 JSON
把工作表转换成 JSON 兼容的 Python 对象,可直接写入文件或当接口数据使用。
三种结构:records(每行一个对象)、columns(每列一个数组)、values(纯二维数组)。
空单元格转 null,日期时间转 ISO 字符串,重复的列名自动加 _2、_3 后缀避免覆盖。
skills/excel/excel2json/
from skills.excel import excel2json
data = excel2json('商品表.xlsx', orient='records', output_path='goods.json')
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
excel_path | str | 是 | - | Excel 文件路径 |
sheet_name | str | 否 | None | 工作表名,默认取第一个 |
orient | str | 否 | 'records' | records、columns 或 values |
output_path | str | 否 | None | JSON 输出路径,指定后同时写文件 |
indent | int | 否 | 2 | 写文件时的缩进,None 表示压缩 |
ensure_ascii | bool | 否 | False | 是否把中文转成 \uXXXX |
list | dict:records 和 values 返回列表,columns 返回字典。
from skills.excel import excel2json
rows = excel2json('商品表.xlsx')
print(rows[0]) # {'商品名': '苹果', '价格': 5.5}
by_column = excel2json('商品表.xlsx', orient='columns')
print(by_column['价格']) # [5.5, 3.0, ...]
excel2json('商品表.xlsx', output_path='goods.json', ensure_ascii=False)
contributors/my12yyds/excel2json.py
Create and edit slide decks, generate slides from templates, and extract text.
ANanthropics/skills203k2,822 new stars in the last 7 days
Create and edit Word docs with TOC, page numbers, headers and more.
ANanthropics/skills203k2,822 new stars in the last 7 days
Read and edit PDFs: extract text and tables, merge, split, rotate, and fill forms.
ANanthropics/skills203k2,822 new stars in the last 7 days
Co-write specs, proposals and decision docs through a structured, iterative workflow.
ANanthropics/skills203k2,822 new stars in the last 7 days
Read and edit spreadsheets: add columns, compute formulas, format, and clean messy data.
ANanthropics/skills203k2,822 new stars in the last 7 days
Create posters and visual art as PNG or PDF, guided by a design philosophy.
ANanthropics/skills203k2,822 new stars in the last 7 days