Spreadsheets are a common interface for operational data management, but building realistic spreadsheet artifacts requires coordinated edits across tables, fields, formulas, views, dashboards, workflows, and permissions. We study this problem as an execution-guided code-agent task. Given a natural-language request and an initial spreadsheet base, the agent must generate executable actions that transform the base into a persistent target artifact. This setting is different from table question answering and one-shot code generation because correctness depends on state transitions, cross-component consistency, and repair from concrete execution failures. We present SheetCraft, a training and evaluation framework for spreadsheet code agents that combines compilation feedback, sandbox execution, and artifact-level judging. SheetCraft trains on distilled tool-use QA data and multi-turn code-agent trajectories derived from real usage scenarios, allowing the model to learn both operation semantics and feedback-conditioned repair. On a 595-case held-out benchmark drawn from real usage scenarios with 1,750 user turns, SheetCraft-27B achieves 96.6/95.0 case-level all-turns compile/execute success and 98.9/98.3 turn-level compile/execute success. Further analysis shows that trajectory supervision, teacher diversity, and budgeted repair are key to reliable spreadsheet construction.
翻译:暂无翻译