- name
- artifact_spreadsheet
- metadata
- { "includeInPrompt": false }
- description
- Create, read, edit, fix, or clean spreadsheet files (.xlsx, .xlsm, .csv, .tsv). Use whenever a build task's artifact kind is spreadsheet, or the task names a spreadsheet file and wants something done to it or produced from it, including restructuring messy tabular data into a proper workbook. Covers openpyxl generation, formulas and recalculation, editing existing workbooks, and the validation gates. Not for tasks whose deliverable is a document, report, or web page that merely contains a table.
Spreadsheet artifacts
An xlsx is generated with the preinstalled openpyxl library from a
generator script. Keep the generator under .src/: it is the editable
source for future revisions, and the binary is always regenerated from it.
Requirements on every delivered workbook:
- Set a non-empty
workbook.properties.titleand a human-readable filename. Data enters the workbook from the build's gathered content only; a value you do not have is a blank cell or a question, never an invented number. - Write formulas, never precomputed results:
sheet["B10"] = "=SUM(B2:B9)", not the Python-computed total. The sheet must recalculate when its inputs change. - Follow the user's spec literally: their exact tab names, exact column headers, and the formula they spelled out. A redesign that computes something else fails, however elegant.
- Zero formula errors at delivery: run the recalculation gate below and fix what it names.
- Document assumptions and hardcoded numbers where the reader will see them (a cell comment or an adjacent labeled cell), citing the real source when one exists and saying plainly when the number came from the user.
- A workbook created for someone to fill in gets a short legend naming the cells to edit and one example row of realistic values; never add an example row to a file you were asked to edit.