2.5 KiB
2.5 KiB
name, description, version, author, tags
| name | description | version | author | tags | |||
|---|---|---|---|---|---|---|---|
| office-export-xlsx | Use when the user wants to export structured table data into a local .xlsx file through the sgClaw Office pipeline. | 0.1.0 | sgclaw |
|
Office Export Xlsx
Convert a structured table artifact into a local .xlsx file. This skill is Office-only: it does not navigate websites, inspect browser DOM, or collect source data. It consumes already prepared rows and hands them to openxml_office.
When to Use
- The user asks to export collected data as Excel.
- An upstream skill already produced
sheet_name,columns, androws. - The task needs a local workbook path as the final deliverable.
Do not use this skill for:
- browser navigation
- data collection from live pages
- free-form spreadsheet editing without a structured table artifact
Required Input Artifact
The upstream skill must provide this structure:
{
"source": "https://www.zhihu.com/hot",
"sheet_name": "知乎热榜",
"columns": ["rank", "title", "heat"],
"rows": [[1, "标题", "344万"]]
}
Rules:
sheet_nameis the target workbook sheet name.columnsis the exact output header order.rowsis the ordered row list to export.- Do not invent missing rows.
- If the artifact is partial, preserve that status in the final result instead of hiding it.
- If the upstream artifact was blocked by login/verification or another browser-side issue, do not continue export as if the data were complete.
Tool Contract
- Call
openxml_officeto render the final.xlsx. - Do not use browser tools in this skill.
- Do not use
shellas the main export path. - Return the final local
.xlsxoutput path afteropenxml_officesucceeds.
Workflow
- Validate that
sheet_name,columns, androwsare present. - Choose the workbook template and output path.
- Pass the structured payload to
openxml_office. - Return the output workbook path plus a short export summary.
Do not:
- recollect browser data from the source page
- reformat the structured artifact into prose before export
- continue other browser exploration after the workbook path is available
References
- Use export-flow.md for the exact export sequence.
- Template assets for this skill belong under
assets/.
Common Mistakes
- Mixing browser collection steps into the Office phase.
- Reformatting the rows into prose before export.
- Dropping the header order defined by
columns. - Returning success without the generated local file path.