Create, edit, inspect, and analyze `.xlsx` spreadsheets and Excel workbooks. Use this skill whenever the user asks to make a spreadsheet, generate an Excel file, create a table as xlsx, import CSV/TSV to xlsx, or work with any `.xlsx` file.
Use this skill whenever the user asks to create, inspect, analyze, or edit an .xlsx workbook, or to turn delimited tabular data into a polished .xlsx file.
skills/xlsx/scripts/create_xlsx.cjs to create a new workbook from headers/rows or JSON data. Fall back to a workspace .cjs script only when the bundled script cannot handle the requirement.skills/xlsx/scripts/import_delimited.cjs for messy CSV or TSV inputs when it saves time, then polish the workbook with xlsx-populate.xlsx-populate.soffice is available so cached values and error checks are current..xlsx artifact.xlsx-populate does not recalculate formulas. Keep formula strings intact and use LibreOffice-backed verification when cached values matter and the runtime says soffice is available.node skills/xlsx/scripts/recalc.cjs workbook.xlsx --json when soffice is available and fix any #REF!, #DIV/0!, #VALUE!, #N/A, or #NAME? errors before delivery..xlsx as the final deliverable. Only fall back to CSV/TSV if the user explicitly wants a flat export.skills/xlsx/scripts/create_xlsx.cjs first. Only write a custom workspace script if the user's requirements exceed what the bundled script supports.skills/ as bundled tooling. Do not write generated task scripts under skills/xlsx/ or skills/office/ for normal workbook jobs.scripts/ or the workspace root, then run them from there. Use skills/xlsx/scripts/... and skills/office/... only as shipped helper commands.node skills/xlsx/scripts/create_xlsx.cjs output.xlsx --headers "Name,Age,City" --rows "Alice,30,NYC;Bob,25,LA" --json
node skills/xlsx/scripts/recalc.cjs workbook.xlsx --json
node skills/xlsx/scripts/import_delimited.cjs raw.csv cleaned.xlsx --json
const XlsxPopulate = require("xlsx-populate");
async function main() {
const workbook = await XlsxPopulate.fromBlankAsync();
const sheet = workbook.sheet(0).name("Summary");
sheet.cell("A1").value("Revenue");
sheet.cell("B1").value("Cost");
sheet.cell("C1").value("Profit");
sheet.cell("A2").value(120000);
sheet.cell("B2").value(45000);
sheet.cell("C2").formula("A2-B2");
sheet.range("A1:C1").style({
bold: true,
horizontalAlignment: "center",
fill: "D9EAF7"
});
sheet.freezePanes("A2");
sheet.column("A").width(16);
sheet.column("B").width(16);
sheet.column("C").width(16);
await workbook.toFileAsync("profit-summary.xlsx");
}
main();
Use skills/xlsx/scripts/create_xlsx.cjs to create a professionally styled .xlsx from scratch. This is the preferred method for creation tasks.
node skills/xlsx/scripts/create_xlsx.cjs output.xlsx --headers "Name,Age,City" --rows "Alice,30,NYC;Bob,25,LA" --json
node skills/xlsx/scripts/create_xlsx.cjs output.xlsx --json-data '[{"Name":"Alice","Age":30},{"Name":"Bob","Age":25}]' --json
node skills/xlsx/scripts/create_xlsx.cjs output.xlsx --headers "Revenue,Cost,Profit" --rows "120000,45000,=A2-B2" --sheet-name "Summary" --json
The script applies professional styling automatically: bold headers with fill color, freeze panes at row 2, auto-filter, and auto-sized column widths. Numbers are auto-detected and written as numbers, not strings. Values starting with = are written as formulas.
skills/xlsx/scripts/import_delimited.cjs for messy CSV or TSV inputs..xlsx starting point.skills/xlsx/scripts/recalc.cjs after significant formula edits when soffice is available to refresh calculated values through LibreOffice.recalc.cjs cannot run because soffice is unavailable, keep formulas intact, do not guess cached values, and state the verification limitation plainly.