SpreadsheetLLM: Encoding Spreadsheets for Large Language Models
Recently, the rapid development of Large Language Models (LLMs) has opened new frontiers in table processing (Li et al., 2023b) and reasoning (Cheng et al., 2022). However, spreadsheets pose unique challenges for LLMs due to their expansive grids that usually exceed the token limitations of popular LLMs, as well as their inherent two-dimensional layouts and structures, which are poorly suited to linear and sequential input. Furthermore, LLMs often struggle with spreadsheet-specific features such as cell addresses and formats, complicating their ability to effectively parse and utilize spreadsheet data, as detailed in Appendix A.
Structural Anchors for Efficient Layout Understanding: Observations indicate that large spreadsheets often contain numerous homogeneous rows or columns, which contribute minimally to understanding the layout and structure (see left panel in Figure 2 (a)). To address this, we identify structural anchors—heterogeneous rows and columns at possible table boundaries that offer substantial layout insights, as depicted in Figure 2 (b). Then we remove distant, homogeneous rows and columns, producing a condensed "skeleton" version of the spreadsheet, as illustrated in Figure 2 (c).
Inverted-Index Translation for Token Efficiency: The vanilla encoding method becomes token-consuming when handling spreadsheets with numerous empty cells and repetitive values, as shown in Figure 2 (c). To improve efficiency, we depart from traditional row-by-row and column-bycolumn serialization and employ a lossless invertedindex translation in JSON format. This method creates a dictionary that indexes non-empty cell texts and merges addresses with identical text, optimizing token usage while preserving data integrity.
Data Format Aggregation for Numerical Cells: Adjacent numerical cells often share similar number formats. Recognizing that exact numerical values are less crucial for grasping spreadsheet structure, we extract number format strings and data types from these cells. Then adjacent cells with the same formats or types are clustered together. This method is visualized in the right example of Figure 2, where rectangular regions are represented by uniform format strings and data types, streamlining the understanding of numerical data distribution without excessive token expenditure. We conducted a comprehensive evaluation of our method on a variety of LLMs. Our experiments show that SHEETCOMPRESSOR significantly reduces token usage for spreadsheet encoding by 96%. Moreover, SPREADSHEETLLM has shown exceptional performance in spreadsheet table detection,

Lines of inquiry this paper opens 24
Research framings built by reading the notes related to this paper — the questions it feeds into.
How should recommendation systems balance model complexity, coverage, and concept drift? Can structured graphs outperform embeddings for complex relational queries?- Can fixed heuristics like PageRank match learned traversal policies on graphs?
- Can knowledge graph structure help embeddings represent more combinations?
- How does hypergraph accumulation differ from single-pass graph retrieval?
- Can hyperedges replace triple-based externalization in reasoning tasks?
- What makes graph traversal superior to vector embeddings for relational reasoning?
- Can graph-based retrieval with knowledge graphs scale to multi-hop reasoning?
- What graph structures better support multi-hop reasoning than pairwise edges?
- Can graph cyclicity and topology predict when reasoning systems achieve breakthrough insights?
- What graph structures would enable transformational creative reasoning in LLMs?
- How does open-ended evolver reasoning identify patterns across heterogeneous user trajectories?
- How do graph topology properties like cyclicity and diameter affect reasoning quality?
- How does meta-reasoning combine information distributed across multiple chains?
- How do graph-based reasoning topologies map to multi-agent interaction patterns?
- Does small-world structure in reasoning graphs improve generalization?
- Can the scaling law for discovery extend beyond architectures to agentic systems?
- Can multi-agent reasoning systems scale beyond current architectures?
- Can the structure-routing principle apply beyond RAG to other AI reasoning systems?
- Can knowledge graphs externalize and validate reasoning steps during inference?