diff --git a/content/posts/calculating-spilled-arrays/index.md b/content/posts/calculating-spilled-arrays/index.md index 5dd54d2..179c11f 100644 --- a/content/posts/calculating-spilled-arrays/index.md +++ b/content/posts/calculating-spilled-arrays/index.md @@ -2,7 +2,7 @@ title: "Calculating spilled arrays in a spreadsheet" summary: " " author: "Prabhanshu Gupta" -lastmod: 2024-01-26 +lastmod: 2024-02-01 --- A spreadsheet formula can evaluate to a single value or an array of values. When it evaluates to an array, the result is "spilled" into neighbouring cells underneath. Here's an example @@ -182,7 +182,7 @@ A working implementation of all this can be found [here](https://github.com/nile [^excel-dynamic-arrays]: [Dynamic array formulas and spilled array behavior](https://support.microsoft.com/en-us/office/dynamic-array-formulas-and-spilled-array-behavior-205c6b06-03ba-4151-89a1-87a7eb36e531) – support.microsoft.com [^google-array-formulas]: In Google Sheets, you can wrap a formula in an [`ARRAYFORMULA`](https://support.google.com/docs/answer/3093275?hl=en) to achieve the same result. Sheets has had the feature for very long (at least since 2009) while Excel introduced this in 2018. [^sestoft-calls-it-a-support-graph]: It's called a `Support graph` in [Spreadsheet Implementation Technology](https://direct.mit.edu/books/book/3071/Spreadsheet-Implementation-TechnologyBasics-and) by Peter Sestoft. -[^phases]: We can mark two "phases" in a spreadsheet's evaluation. A first pass, when we start with a sheet full of formula strings and no other information. All the cells in a sheet need to be evaluated in _some_ order (row-major, let's say). The first pass sets up the stage for any incremental re-evaluations.

Once a first pass is done, each cell update causes an incremental re-evaluation. We tackle incremental re-evaluations first. The first pass can then be expressed as incremental evaluations over each cell starting with a blank sheet. +[^phases]: We can mark two "phases" in a spreadsheet's evaluation. A first pass, when we start with a sheet full of formula strings and no other information. All the cells in a sheet need to be evaluated in _some_ order (row-major, let's say). The first pass sets up the stage for any incremental re-evaluations.

Once a first pass is done, each cell update causes an incremental re-evaluation. We tackle incremental re-evaluations here. The first pass can then be expressed as incremental evaluations over each cell starting with a blank sheet. [^lord-io]: [How to recalculate a spreadsheet](https://lord.io/spreadsheets/), lord.io [^sestoft]: Once a first pass is done, each cell update causes an incremental re-evaluation. We tackle incremental re-evaluations first. The first pass can then be expressed as incremental evaluations over each cell starting with a blank sheet.