SpreadsheetBench: Towards Challenging Real World Spreadsheet Manipulation

Zeyao Ma, Bohan Zhang, Jing Zhang, Jifan Yu, Xiaokang Zhang, Xiaohan Zhang, Sijia Luo, Xi Wang, Jie Tang · DOI

Introduction

While Large Language Models (LLMs) are frequently marketed as capable data assistants, their performance on real-world spreadsheet tasks remains surprisingly limited. Most existing benchmarks rely on synthetic, clean relational tables that do not reflect the "messy" reality of professional Excel use. Real-world spreadsheets are often flexible 2D canvases featuring nested headers, multiple tables per sheet, and non-textual cues like cell colors. SpreadsheetBench is a new, rigorous benchmark designed to bridge this gap by sourcing 912 complex tasks from online forums to evaluate the true capabilities of AI agents.

Methodology: The SpreadsheetBench Pipeline

To ensure the benchmark is both challenging and representative, the authors developed a four-stage construction pipeline followed by a rigorous evaluation framework.

  1. Data Sourcing: Real-world questions and workbooks were scraped from popular forums like ExcelForum and Chandoo.
  2. Filtering: The team selected "solved" problems that were feasible to automate and representative of common user pain points.
  3. Instruction Generation: Using a human-in-the-loop approach with GPT-4, messy forum threads were condensed into clear, self-contained natural language instructions.
  4. OJ-Style Test Case Construction: Borrowing from competitive programming (Online Judges), multiple versions of each spreadsheet were created. Each version maintains the same structure but uses different data values to test the robustness of the AI's solution.
The SpreadsheetBench construction pipeline, featuring data sourcing from forums, instruction generation, and OJ-style test case construction.

Dataset Characteristics and Complexity

SpreadsheetBench consists of 912 unique instructions and 2,729 test cases (averaging 3 per instruction). The benchmark stands out for its complexity compared to predecessors like SheetCopilotBench. For instance, SpreadsheetBench instructions are significantly longer and more context-heavy, averaging 85.7 words compared to just 9.8 for InstructExcel.

Structurally, the data is far more diverse: 35.7% of sheets contain multiple tables, and 42.7% feature non-standard relational structures such as nested headers or missing labels. This requires models to possess "spatial logic" to understand the 2D grid layout, rather than just treating the data as a standard SQL-style database.

A comparison of spreadsheet layouts and instructions between existing benchmarks (SheetCopilotBench) and SpreadsheetBench, highlighting the increased complexity of real-world tasks.

Performance Analysis and the Robustness Gap

The evaluation utilized two primary metrics: Soft Restriction (partial credit for passing some test cases) and Hard Restriction (requiring the model to pass all test cases for an instruction). The results reveal a massive performance gap between humans and AI:

  • Human Performance: Experts achieved 62.00% on Hard Restriction.
  • SOTA Models: GPT-4o, the top performer, reached only 15.02% (Hard) and 18.35% (Soft).
  • Open Source Models: Models like Llama-3 (70B) and Mixtral 8x7B struggled significantly, often scoring below 5%.

A key finding was the "Robustness Gap." Many models generated Python scripts with hard-coded cell references (e.g., A1:A10). While these might work for a single instance, they fail the moment the data grows or shifts, highlighting that current AI agents are often "brittle" when faced with dynamic data.

Conclusion

SpreadsheetBench demonstrates that spreadsheet manipulation is essentially a program synthesis task requiring high-level spatial reasoning and robustness. While AI can help users search for answers, it still struggles to execute complex, non-standard tasks that define professional spreadsheet use. Future work must focus on improving LLMs' ability to navigate 2D grids and generate code that generalizes across varying data contexts.

Summary updated

BibTeX
@inproceedings{ma2024spreadsheetbench,
  author = {Zeyao Ma and Bohan Zhang and Jing Zhang and Jifan Yu and Xiaokang Zhang and Xiaohan Zhang and Sijia Luo and Xi Wang and Jie Tang},
  title = {{SpreadsheetBench: Towards Challenging Real World Spreadsheet Manipulation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=KYxzmRLF6i},
}
Figure