CRAFT: An Agentic Spreadsheet Form Filling System with Template Awareness
Organizations: Shanghai Jiao Tong University · Microsoft Research · Purdue University
Abstract
Spreadsheet form filling requires agents to consolidate external evidence, ground values to precise cells, and preserve irregular template structure. Errors in early edits can overwrite labels or misalign fields, undermining later decisions. We propose CRAFT, a template-aware agent framework that connects reflective validation to constrained local repair. Instead of treating reflection as a free-form request to regenerate the workbook, CRAFT grounds detected errors to spreadsheet regions, restores corrupted template state when necessary, and re-grounds plausible writable slots before subsequent edits. A Rectangle-Aware Slot Grounder (RASG) proposes writable cells, while label-slot hints and protected regions constrain subsequent edits. We introduce FormFillBench, with 327 forms across Instruction-Only and Multi-File tracks. Compared with the strongest baselines, CRAFT improves pair accuracy by 8.51 and 23.38 percentage points on these tracks, respectively. Component-removal experiments support structural adjudication and slot re-grounding within the pipeline, and the framework retains its relative advantage among the methods evaluated with a second backbone. The code and benchmark FormFillBench are available at https://github.com/Glllllly/CRAFT.
Figures & tables
| Instruction-Only | Multi-File | |||
| Method | Pair | E2E | Pair | E2E |
| VLM+HTML+Image | 51.17 | 13.5 | 32.60 | 12.60 |
| VLM+HTML | 49.26 | 11.0 | 26.31 | 7.87 |
| VLM+Excel Skills+Coding | 10.66 | 0.0 | 0.26 | 0.0 |
| LangGraph | 44.28 | 10.0 | 33.65 | 12.60 |
| OpenAI Agents SDK | 45.64 | 9.5 | 43.14 | 16.54 |
| Instruction-Only | Multi-File | |||
| Method | Pair Acc. | E2E Acc. | Pair Acc. | E2E Acc. |
| CRAFT | 59.68 | 15.5 | 66.52 | 43.31 |
| CRAFT w/o SALA | 52.97 | 10.0 | 25.48 | 10.24 |
| CRAFT w/o PSR | 50.45 | 12.5 | 24.86 | 3.15 |
| CRAFT w/o Re. | 53.71 | 10.5 | 24.96 | 7.87 |
| CRAFT w/o Re. & Pl. | 51.63 | 12.5 | 24.17 | 6.30 |
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
| Risk Signal | Illustrative Example |
| Label-cell overwrite | The value “11-2045-5-601002-4310” is written into merged range K19:T19 , which originally contains the static template label “Account Number”, thereby overwriting template-side content. |
| Semantic ambiguity | The value “Robert J. Miller” is written into cell B20 , even though this slot should be associated with the first occurrence of Name rather than the second one, creating ambiguity between duplicated label groups. |
| Template inconsistency | Cell K20 is left-aligned, while the neighboring filled cells in the same local group are all center-aligned, indicating a local formatting inconsistency. |
| Label–value layout abnormality | The slot for Signature is located above its label, but the value is written into a nearby cell below or beside the label, violating local top-slot / bottom-label layout. |
| Instruction-Only | Multi-File | |||||||
| Method | 4 | 29 | 38 | 84 | 88 | 226 | 238 | 284 |
| VLM+HTML+Image | ✓ | ✓ | ✓ | |||||
| VLM+HTML | ✓ | ✓ | ✗ | |||||
| VLM+Excel Skills+Coding | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
| LangGraph | ✓ | ✓ | ✓ | ✗ | ||||
| OpenAI Agents SDK | ✓ | ✓ | ✓ | ✗ | ||||
Spreadsheet Automation
Spreadsheet automation uses AI to understand, create, edit, and validate workbooks while preserving their formulas, structure, and intended use.
See all 20 papers