Spreadsheets are widely used for data analysis and supporting decision-making. Automating spreadsheet analysis while protecting sensitive data and controlling deployment costs motivates locally deployed open-weight large language models (LLMs). Meanwhile, complex spreadsheet tasks require both task reasoning and workbook understanding, while predefined operation interfaces impose additional tool-selection and invocation demands. We introduce SheetAlign, a spreadsheet manipulation framework with stage-isolated policy learning, organized around where to operate, what to change, and how to implement transformations. Task-guided inspection and API grounding anchor code generation in workbook observations and available operations, while stage-isolated learning optimizes program generation and review using edit-progress rewards. At inference, execution consistency selects programs through agreement among workbook states. On SpreadsheetBench, our grounded task interface improves Qwen3-4B's accuracy from 13.5% to 29.2% on average without training. With learning and execution consistency, SheetAlign achieves 32.8% accuracy on average on SpreadsheetBench and 30.1% on Domain-Spreadsheet, outperforming comparable baselines. The code will be made publicly available upon publication.
Figures & tables
Figure 1: Motivations for SheetAlign. Upper: Executable programs may modify unintended cells without task-to-edit grounding. Lower: Whole-task rewards overlook partially completed edits.
Figure 2: Overview of SheetAlign, integrating task grounding, stage-isolated learning, and execution consistency.
Method
Avg. (%)
Closed-source systems
GPT-4o (LibreOffice)
16.8
GPT-4o (Excel)
18.4
OpenAI o3
23.3
ChatGPT Agent
35.3
ChatGPT Agent (.xlsx)
45.5
Table 1: Main results on SpreadsheetBench (%). Avg. (Average Accuracy) measures the proportion of correctly solved workbook instances. Hard (Hard Accuracy) requires all instances of a task to be correct. Exec. (Execution Success Rate) measures successful program executions across instances. Execution consistency uses K=4 candidates.
Spreadsheet-RL
SheetAlign
Domain
Base
RL
Harness
Learn.
Consist.
Finance-B
15.6
29.3
36.7
37.0
42.9
Finance-I
7.7
16.2
26.8
28.1
31.2
Finance-A
8.1
19.3
22.2
27.4
28.8
Supply Chain
1.1
5.0
10.6
14.4
16.0
HR
0.5
3.2
13.5
14.1
14.6
Table 2: Average accuracy (%) on Domain-Spreadsheet using Qwen3-4B-Thinking-2507 as backbone. Harness denotes our grounded task interface, Learn. adds stage-isolated training, and Consist. applies execution consistency with K=4 candidate programs.
SpreadsheetBench
Configuration
Hard
Avg.
Exec.
Full interface
23.9
29.2
97.1
w/o task-guided inspection
17.2
21.4
96.7
w/o API grounding
20.7
25.2
95.8
w/o diagnostic repair
20.2
24.4
90.5
Domain-Spreadsheet
Table 3: Component ablations of the grounded task interface on SpreadsheetBench and Domain-Spreadsheet (%). Each variant removes one component from the full interface. Removing diagnostic repair retains diagnostic checks but disables LLM-based program correction.
SpreadsheetBench
Domain
Configuration
Hard
Avg.
Exec.
Avg.
Exec.
Training signals
Outcome-based
24.0
29.1
95.7
22.3
90.8
Common (multi-signal)
24.5
29.3
96.4
24.0
92.5
Stage-isolated training
Generation + Common
24.9
30.0
97.0
25.3
92.7
Table 4: Effects of training signals and stage-isolated policy learning on SpreadsheetBench and Domain-Spreadsheet (%).
SpreadsheetBench
Candidate pool
Selection
Hard
Avg.
Exec.
Common + Generation
First-valid
25.0
30.7
98.2
Common + Generation
Learned
25.8
31.4
98.4
Grounded task interface
Consistency
26.1
31.5
98.2
Common policy
Consistency
26.6
32.4
98.6
Generation policy
Consistency
26.8
32.7
98.5
Table 5: Selection results on SpreadsheetBench and Domain-Spreadsheet (%) with K=4 . Common + Generation samples two candidates per policy. The selected program is reviewed once for intent misalignment.
Benchmark
Selected
Oracle
Gap
SpreadsheetBench
32.8
39.7
6.9
Domain-Spreadsheet
30.1
40.7
10.6
Table 6: Oracle bounds for Common + Generation ( K=4 ) in average accuracy (%). Oracle selects one program per task using references. Gap measures the difference from consistency selection in percentage points.
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
Setting
Value
Optimizer updates
40
Prompts per update
4
Responses per prompt ( K )
4
Learning rate
8×10−7
LoRA rank
16
LoRA scaling parameter
32
Appendix
Table 7: Optimization settings for generation policy and review policy training.
Figure 3: Training dynamics of generation and review policies. The panels show mean training reward and execution success across optimization steps.
Spreadsheet agents are converging on elaborate multi-agent designs, yet it is unclear how much of their performance comes from the agents rather than from the action interface they share. We answer this with SheetMind, a Manager-Action-Reflection framework, in a controlled study over all 221 tasks of the SheetCopilot Benchmark: five architectural variants, four backbones, exact McNemar tests on paired outcomes, and a checker reproducing the official chart and pivot comparisons. Replacing the high-level action API with primitive cell operations costs 47.1 points (p < 0.0001) and leaves the agent below a do-nothing baseline, whereas both extra agents together are worth 3.2 points: the Reflection Agent adds +4.5 (p = 0.013), the Manager +1.4 (p = 0.68). Decomposition instead changes how the system fails, cutting silently wrong outputs from 33% to 25% of tasks (p = 0.010). Capability saturates: GPT-5 and the five-times-cheaper GPT-5-mini are not significantly different (61.1% vs. 58.4%, p = 0.15), while GPT-3.5 loses 16.3 points and fails differently. A reflector must judge the step it just took, not the subtask. SheetMind reaches 61.1% Pass@1 with GPT-5 on the full SCB-221, against a do-nothing baseline of 9.0%. Accuracy comes from the operations an agent can name; the agents decide how it fails.
Lyuhao Chen, Xi Cheng, Yanming Kang +11
Carnegie Mellon University · Cornell University · University of California, Berkeley +2
Spreadsheet systems (e.g., Microsoft Excel, Google Sheets) play a central role in modern data-centric workflows. As AI agents grow increasingly capable of automating complex tasks, such as controlling computers and generating presentations, building an AI-driven spreadsheet agent has emerged as a promising research direction. Most existing spreadsheet agents rely on specialized prompting over general-purpose LLMs; while this design has potentials on simple spreadsheet operations, it struggles to manage the complex, multi-step workflows typical of real-world applications. We introduce Spreadsheet-RL, a reinforcement learning (RL) fine-tuning framework designed to train specialized spreadsheet agents within a realistic Microsoft Excel environment. Spreadsheet-RL features an automated pipeline for scalable collection of paired start-goal spreadsheets from online forums, as well as domain-specific evaluation tasks in areas such as finance and supply chain management, which we compile into the new Domain-Spreadsheet benchmark dataset. It also includes a Spreadsheet Gym environment designed for multi-turn RL: Spreadsheet Gym exposes extensive Excel functionality through a Python sandbox, along with a refined harness that incorporates a comprehensive tool set and carefully designed tool-routing rules for spreadsheet tasks. Through comprehensive experiments, we show that Spreadsheet-RL substantially enhances AI agent's performance on both general and domain-specific spreadsheet tasks: it improves Qwen3-4B-Thinking-2507's Pass@1 on SpreadsheetBench from 12.0% to 23.4%, and raises Pass@1 from 8.4% to 17.2% on our curated Domain-Spreadsheet dataset. These results highlight Spreadsheet-RL's strong potential for generalization and real-world adoption in spreadsheet automation, and broadly, its promise for advancing LLM-based interactions with data interfaces in everyday work.
Spreadsheets are widely used for business analysis, financial modeling, reporting, and decision-making. However, most existing spreadsheet benchmarks evaluate isolated operations such as single-formula generation or local cell edits, and therefore fail to capture end-to-end workflows in realistic business settings. We introduce SpreadsheetBench 2, a workflow-level benchmark for spreadsheet agents that covers three task categories: generation, debugging, and visualization. The benchmark is constructed from authentic business data, including financial reports and corporate filings, and is annotated and validated by domain experts. The benchmark contains 321 tasks; each instance averages 11.8 worksheets and requires 593.5 cell modifications, reflecting large multi-sheet workbooks with cross-sheet dependencies. We evaluate eight frontier large language models under a unified multi-turn agent scaffold, and additionally include several LLM-based spreadsheet products as complementary baselines. Results show that current systems remain far from reliable on real-world workflows: the best model achieves 34.89% overall task accuracy, and debugging accuracy is as low as 12.00%. Trajectory analysis and a failure taxonomy further indicate that insufficient spreadsheet inspection and incorrect target-cell selection are the dominant bottlenecks. Together, these findings position SpreadsheetBench 2 as a challenging testbed for advancing reliable spreadsheet automation. Project page: https://spreadsheetbench.github.io/
Jian Zhu, Yuzheng Zhang, Zeyao Ma +11
School of Information, Renmin University of China · Aptura AI · Shortcut AI +1