arXiv:2608.26345cs.HCAug 2026

Manuscript Offprint

arXiv:2608.26345

Kale: A Transformation-Safe Spreadsheet System

Michael Coblenz, Jacob Yim, Ajinkya Bokade, Mounika Padala, Julia Epshtein, Priyanka Bhatia, Piyush Chauhan, Simran Gill, Aniket Gupta, Grishma Gurbani, Vaibhav Khetan, Arushi Munjal, Jeffery Tung, Joanna Yang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Michael Coblenz 1∗^{1*}, Jacob Yim 1^{1}, Ajinkya Bokade 2^{2}, Mounika Padala 3^{3}, Julia Epshtein 4^{4}, Priyanka Bhatia 5^{5}, Piyush Chauhan 6^{6}, Simran Gill 3^{3}, Aniket Gupta 1^{1}, Grishma Gurbani 1^{1}, Vaibhav Khetan 3^{3}, Arushi Munjal 1^{1}, Jeffery Tung 1^{1}, Joanna Yang 1^{1}

1^{1}University of California, San Diego.

2^{2}Salesforce, Inc.

3^{3}Apple, Inc.

4^{4}University of Massachusetts, Amherst.

5^{5}Meta, Inc.

6^{6}Eukarya, Inc.

*Corresponding author(s). E-mail(s): mcoblenz@ucsd.edu; Contributing authors: j1yim@ucsd.edu; acbokade@gmail.com; mounikapadala11@gmail.com; jepshtein@umass.edu; b.priyanka0210@gmail.com; piyushchauhan1004@gmail.com; gillsimu98@gmail.com; ang042@ucsd.edu; grishmagurbani1998@gmail.com; vaibhavkhetan2703@gmail.com; amunjal@ucsd.edu; j7tung@ucsd.edu; joy002@ucsd.edu;

Abstract

Spreadsheet formulas can refer to rectangular ranges of arbitrary size. When a user changes the structure of a referenced table, the spreadsheet system updates the references to refer to a new range. Unfortunately, this new range may differ from the user's expectations, introducing bugs in spreadsheets. We describe a user study showing that standard reference semantics are error-prone, resulting in significant risk to users. We introduce Kale, a prototype system that eliminates the risk of inserting these kinds of bugs by restricting the kinds of references that can be expressed. We show that Kale can be used effectively by users to complete tasks that are error-prone in traditional spreadsheet systems. Finally, we describe a corpus study that evaluates the extent to which the reference restrictions in Kale might have implications on users.

Keywords: spreadsheets, spreadsheet errors, end-user programming

1 Introduction

Spreadsheets may well represent the world’s most popular programming language [1], with likely hundreds of millions of users worldwide [2]. They are used for essential work in nearly every industry, including business, finance, economics, and science. Unfortunately, many spreadsheets are buggy, potentially leading users to incorrect conclusions. Various studies have shown that about 95% of spreadsheets contain errors [3]. Spreadsheet errors have resulted in significant economic and scientific costs. For example, J.P Morgan Chase’s 2012 “London Whale” debacle stemmed from a spreadsheet error, costing the company $6.2B [4]. Approximately one fifth of genetics papers that included supplementary Excel gene lists were found to include erroneous gene name conversions [5].

Most prior work on spreadsheet errors has focused on the possibility of entering incorrect formulas. In this work, we provide empirical evidence for a different cause of spreadsheet errors that has not, as far as we are aware, been studied previously. When a spreadsheet table that is referenced by formulas is modified structurally (for example, by inserting a row), the referencing formulas are automatically updated by the spreadsheet system. For example, if a formula references cell B2 of a table, and the user inserts a row at the top of the table, the formula is then updated to refer to cell B3. This behavior is intended to preserve the semantics of the formula, since any data that was previously located in cell B2 will now be located in cell B3.

But do spreadsheet references actually refer to the data in a cell, or do they refer to the geometry of the cell? In the previous example, they refer to the data; if they referred to the geometry, they would still point to the same coordinates after the change. Consider the formula SUM(B2:C3), which refers to a 2x2 rectangle of cells, and suppose that the user drags and drops cell C3 to a new location. The formula remains unchanged, but it may evaluate to a different value because cell C3 is now empty. In this case, the reference apparently referred to the geometry, not the data. We refer to this problem as reference instability: references are unstable under structural changes to spreadsheets, which can result in the introduction of bugs into previously-correct spreadsheets.

Kale, shown in Figure 1, is a novel prototype spreadsheet system that improves safety by re-envisioning the syntax and semantics of spreadsheet references. In Kale, references can refer to individual cells, whole rows, and whole columns, but not spans of rows or columns, and not arbitrary rectangular ranges. In doing so, Kale avoids the reference instability that is fundamental to traditional spreadsheet systems.

Kale provides a key safety property not provided by traditional spreadsheets: preservation of referenced data through structural transformations. That is, when rows or columns are inserted, removed, or permuted, formulas that reference data in affected cells will continue to refer to the same data after the transformation. Furthermore, when a formula itself is moved, it will refer to either the same data as before or the

Sheets: Task_3

Add ColumnAdd Row BeforeAdd Row AfterDelete RowInsert Copied Rows AboveInsert Copied Rows Below

Name Bar

Insert Name Here

#≡Labor_Category_Description≡year_one≡year_two
!!!0Administrative/Graphics Specialist31.1932.44
!!!1BPR Specialist, Senior118.52123.26
!!!2Budget/Financial Analyst65.4168.02
!!!3Budget/Financial Analyst, Junior48.4350.37

Fig. 1: Kale, as seen in our Payroll task. A spreadsheet table is shown at the bottom; above are tabs showing available sheets and a set of buttons with available actions.

same relative offset according to the intent of the formula's author. This property does not hold in traditional spreadsheets.

Kale is designed to eliminate the risks posed by traditional spreadsheet systems: transformations can introduce bugs in formulas by breaking assumptions made by formula authors about which data formulas refer to. Each transformation presents a risk, which we index R1, R2, etc.

R1: Insertions adjacent to ranges are ambiguous. When rows or columns are inserted immediately above or below a referenced range, it can be unclear whether the reference should be updated to include the new rows or columns. If the new row or column represents another instance that is similar to the nearby ones, failing to include the new item represents an error. Sheets, Excel, and Numbers do not extend references to include new adjacent rows, but Excel emits a warning in the referencing cell.

R2: Sorting permutes referenced data. Sorting permutes rows in a table without updating any references to the sorted table. If an author intended a formula to refer to data in a row that the sort operation moves, then sorting breaks that formula.

R3: Moving cells changes references. Moving rows or columns causes references that start or end at the moved row or column to be updated. For example, if a formula references B2:B3 and the user moves row 3 below row 4, then the formula now refers to B2:B5, suddenly including the data in the row that was previously at index 4. In Excel, this operation is triggered by cut/paste; in Numbers and Sheets, by drag/drop.

ABC
1Exchange RateUSDCAD
21.3720=A2*B2
330

(a) The user uses the exchange rate in cell A2 to convert the value in cell B2 to CAD.

ABC
1Exchange RateUSDCAD
21.372027.4
330

(b) The user drag-fills the formula down.

ABC
1Exchange RateUSDCAD
21.372027.4
330=A3*B3

(c) The value of the produced formula is unexpectedly 0.

(d) Upon closer inspection, the user sees that the new formula no longer references the intended exchange rate.

Fig. 2: References are relative by default in Excel, leading to errors when users intend to use absolute references.

R4: Names do not always move alongside data. Cells can be given names. When structural changes occur, it can be unclear whether names will move. In Excel and Sheets, names move with values when cells are cut and pasted but not when cells are sorted.

R5: References are relative by default. When a formula cell is copy-pasted or drag-filled, any resulting formulas are automatically adjusted to their new location. For instance, if a formula in cell B1 referencing cell A1 (the cell directly to the left) is drag-filled down to cell B2, the new formula now references cell A2. If the author intends this new formula to reference the same cell as the copied formula, this behavior creates an error. A scenario demonstrating a variation of this error is shown in Figure 2. To avoid this error, the author would have to explicitly write absolute references; in Excel, Sheets, and Numbers, this is done by using the dollar sign symbol ()tomarkabsoluterowandcolumnreferences(e.g.) to mark absolute row and column references (e.g. A$1).

Confusingly, although traditional spreadsheets distinguish between relative and absolute references, this distinction does not address risks R1-R4. In Excel, Sheets, and Numbers, the absolute vs. relative distinction only affects which cells are referenced by a formula that is created by copy/paste or drag-fill; it has no influence on how a formula is updated when the structure of the referenced table is modified. For example, if a formula includes the absolute reference BB2 and the formula is copy/pasted one cell below its original location, the formula would still refer to BB2. In contrast, if the reference had been relative (B2), it would then refer to B3. But both absolute and relative references are treated identically when row 2 is drag/dropped to a new location: the original formula might then refer to BB7, for example, if the new location of the data is row 7. In Kale, the terms absolute and relative are re-defined so that they capture the semantics that a reference should have when a table is re-structured.

We describe a user study comparing Kale to traditional spreadsheets. We asked participants to complete four tasks using either Google Sheets or Kale. Each task is associated with a subset of the risks described in Section 1. The study focuses on assessing whether, when participants are given tasks that may break formulas, participants indeed transform their document in ways that introduce bugs. For participants who do introduce bugs, we assess whether they notice and are able to successfully fix them.

Because Kale restricts the kinds of references that can be expressed, there is a possibility that common problems that spreadsheets are used for cannot be solved in Kale. We describe an evaluation of the impact of Kale's restrictions by manually porting 60 randomly-selected spreadsheets from the EUSES spreadsheet corpus [6]. We successfully translated all of the spreadsheets to use Kale's reference approach. Nonetheless, due to the restrictions, we regard Kale as a design exploration that shows the potential benefits of controlling unsafe references; it is possible that future systems that relax some of these restrictions could be more usable in practice.

This paper describes the following contributions:

  1. A new spreadsheet system, Kale, which prevents users from introducing the aforementioned bugs with new syntax and semantics for spreadsheet reference (Section 2).

  2. A user study (Section 4) showing that when users of a traditional spreadsheet, Google Sheets, re-structure documents, they often introduce latent spreadsheet bugs. In contrast, users are more often able to complete those tasks successfully using Kale.

  3. A corpus study showing that most existing spreadsheets can be represented in Kale (Section 5).