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

TL;DR

Researchers have introduced SPREADSHEETBENCH, a new benchmark for spreadsheet manipulation that abandons synthetic, "clean" data in favor of 912 complex, real-world tasks sourced from online Excel forums. By implementing an "Online Judge" style evaluation with multiple test cases per task, the study reveals a massive performance gap: even the best models like GPT-4o achieve only ~15-20% accuracy, while human experts score over 60%.

What Problem Does This Paper Address?

While Large Language Models (LLMs) have shown promise as "spreadsheet agents," current evaluations are often misleading. Existing benchmarks typically rely on "self-instruct" techniques to generate synthetic queries or use simplified, single-table spreadsheets that look more like clean SQL databases than actual Excel files.

Comparison of clean vs. messy spreadsheets

In the real world, spreadsheets are "messy." They contain multiple tables on one sheet, nested or missing headers, and non-textual information like cell colors or bold text. Furthermore, a model might generate a "lucky" solution that works for one specific file but fails when the data values change. The authors argue that current benchmarks fail to capture these intricacies, leading to an overestimation of how helpful these AI agents actually are in a professional workflow.

Methods

The authors developed a rigorous pipeline to move beyond simple "Text-to-Formula" tasks:

SpreadsheetBench construction and evaluation pipeline
  1. Real-World Sourcing: They crawled four major Excel forums (like ExcelForum and Chandoo) to find authentic user problems.
  2. Human-in-the-Loop Cleaning: Using a mix of GPT-4 and human annotators, they condensed cluttered forum threads into self-contained instructions.
  3. OJ-Style Evaluation: Borrowing from competitive programming, they introduced an Online Judge (OJ) metric. For every instruction, they created three distinct test cases (different data values but the same structure). A model's code solution only passes if it works correctly across all test cases, ensuring the solution is robust and not just overfitted to one example.
  4. Multi-Round Interaction: They evaluated models in both single-round (one shot) and multi-round settings, where models could receive error feedback from a code compiler to refine their answers.

Datasets

The primary contribution is SPREADSHEETBENCH, which consists of:

  • 912 instructions derived from real user queries.
  • 2,729 test cases (averaging 3 per instruction).
  • Diverse Formats: 35.7% of the spreadsheets contain multiple tables, and 42.7% feature non-standard relational structures (like nested headers).
  • Scale: Includes files with over 100 columns and 20,000 rows.

Key Insights and Ideas

  • The "Relational" Trap: Most AI models are trained on clean relational tables (like CSVs). SPREADSHEETBENCH proves that these models fall apart when faced with "non-standard" layouts. Performance drops significantly when a sheet contains multiple tables or lacks clear headers.
  • Coding is the Bottleneck: The most successful agents don't just "guess" an answer; they write Python code (using libraries like openpyxl) to manipulate the file. Models with stronger general coding proficiency (like DeepseekCoder) significantly outperformed general-purpose models of similar size.
  • The Multi-Round Paradox: While multi-round prompting (allowing the model to see errors and try again) helped most models, it actually caused a slight performance dip for GPT-4o. The authors found that GPT-4o’s strict adherence to instructions sometimes led it to ignore its own previous successful steps or get bogged down by excessive context.
  • The Human-AI Gap: There is a staggering 40-50% gap between the best LLM and a human Excel expert. This suggests that "solving Excel" is far from a solved problem for AI.

Key Results

The benchmark uses two main metrics: Hard Restriction (must pass all test cases) and Soft Restriction (partial credit for passing some).

  • GPT-4o (SOTA): Achieved the highest score but still only reached 15.02% on the Hard Restriction metric.
  • Open-Source Models: Llama-3 (70B) and Mixtral-8x7B struggled immensely, scoring below 4% even with multi-round help.
  • Human Performance: Excel experts achieved 62.00% on the Hard Restriction metric, highlighting the benchmark's difficulty even for specialists.
  • Complexity Impact: Accuracy dropped by nearly half when moving from spreadsheets with fewer than 50 rows to those with more than 50, and from single-table to multi-table layouts.

Limitations and Future Work

The authors acknowledge a few key limitations:

  • Data Selection Bias: They only included forum posts that were already "solved" or had clear answers, potentially excluding the most "impossible" real-world edge cases.
  • Corner Case Coverage: While three test cases are better than one, they may not capture every possible "corner case" a human might encounter.
  • Software Specifics: The benchmark focuses on cell values and formatting but avoids software-specific features like "Power Query" or complex "Pivot Table" interactions that are hard to evaluate programmatically.

Future work will likely focus on improving LLMs' ability to "see" and reason about 2D spatial layouts and non-standard table structures more effectively.

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