Synthdata extract
Extract tabular data from Excel workbooks (.xlsx) to JSON files, one per sheet. Auto-detects whether a sheet has a title-banner row above the headers (synthdata-generate convention) or starts with headers directly. Use this skill when the user wants to convert an Excel file to JSON, extract spreadsheet data, parse an xlsx file, prepare data for downstream analysis tools that don't read Excel natively, or set up a dataset for the other synthdata skills. Also trigger on "extract the data", "parse this spreadsheet", "convert to JSON", or "read this xlsx file".From its SKILL.md
npx -y skills add rappdw/synthdata --skill synthdata-extractAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.3 KB, as published. Nobody here has run it
Synthdata Extract
Extract every sheet of one or more Excel workbooks to JSON files. Each sheet becomes a JSON array of row objects keyed by header name.
Prerequisites
pip install openpyxl --break-system-packages
Workflow
Step 1: Locate the source file(s)
Ask the user which file(s) to extract, or inspect the current directory. Either:
- A single file:
./data.xlsx - A directory containing
.xlsxfiles:./data/
Step 2: Run the extraction
python scripts/extract.py --input ./data.xlsx --output ./json/
# or multiple files / a directory
python scripts/extract.py --input ./data/ --output ./json/
CLI flags:
| Flag | Default | Description |
|---|---|---|
--input | . | Input .xlsx file, or directory containing .xlsx files |
--output | ./json | Output directory for JSON files |
--title-row | auto | auto (detect), yes (skip row 1), no (row 1 is headers) |
--flatten | false | If true, output single file per workbook instead of per sheet |
--indent | 2 | JSON indent (0 for compact) |
The script:
- Auto-detects title rows by checking if row 1 has only one non-empty cell (a merged banner)
- Skips empty rows
- Serializes dates as ISO strings
- Names outputs as
<workbook>_<sheet>.json(or<sheet>.jsonif one workbook)
Step 3: Report results
Print row counts per sheet and the output directory path.
Convention
This skill reads Excel files produced by synthdata-generate by default (row 1 = title banner,
row 2 = column headers, row 3+ = data). It also handles plain sheets (row 1 = headers, row 2+ = data)
when --title-row no is set or when auto-detection determines no title row exists.