cat / 012
clone

a spreadsheet for the terminal: lotus 1-2-3 looks, google sheets keys and formulas, one go binary

main
012 / docs / files / excel.md
excel.md 9.9K rendered
1---2title: "Excel files"3sidebar_position: 24---56# Excel files78**Read:** every sheet, opening on the one Excel showed; values, formulas9(references between sheets too, shared formulas), workbook named ranges,10number formats, bold, italic, underline, strikethrough, alignment,11[wrapped text, borders, row heights and merged cells](#layout-in-excel),12column widths, column and row styles, frozen panes, [filters](#filters-in-excel),13[tables](#tables-in-excel), notes (Excel's notes, its legacy comments; threaded comments aren't14read), [conditional formatting and data validation](#rules-in-excel),15[array formulas](#arrays-in-excel),16dates in the 1904 system, and hidden sheets (unless it's the one Excel17showed).1819**Written:** the same, with formulas in Excel's syntax and their results20cached, column and row formats as column and row styles, frozen rows and21columns as frozen panes, a filter as Excel's with the rows it hides22hidden, notes as Excel's notes (which Sheets reads as notes), and23formulas that spill as Excel 365's [dynamic array formulas](#arrays-in-excel), and24[tables](#tables-in-excel) as Excel's tables.2526What changes on the way:2728| | |29|---|---|30| Formulas 012 can't read (unknown functions) | Keep their values |31| Currency, Date and Time formats in a sheet in another [locale](../sheets/locale.md#what-doesnt) than en-US | Go out in the locale's form, tagged with it (`[$€-407]`), and come back as those formats in that locale |32| Excel pivot tables | Come in as the values they showed; 012's go out as their results, not a pivot |33| Excel's sheet protection | Comes in unprotected, with a note saying so: Excel's protection locks cells where 012's only warns. Protected ranges aren't written |34| Array formulas (Excel 365's dynamic arrays and older `{=...}` ones) | Come in as formulas that spill again, without the values Excel kept in the cells they spill into |35| Functions only Sheets has, and array literals holding references | Go out as values, counted in the download's note: see [Arrays in Excel](#arrays-in-excel) |36| Formulas reading a notebook output or a linked file by column (`app[status]`) | Go out as values: the file holds the output's cells but no table for Excel to read |37| JEV functions, `#AND#`, formulas naming a sheet that doesn't exist | Go out as values (their `#REF!`, for a missing sheet: Excel would refuse the reference). The download's result counts the formulas saved as values, with an example |38| A sheet name Excel can't take as is (spaces at its ends, or the same as another's but for them and case) | Written as one it can: without the spaces, with a number when two would clash (`Plan (2)`); formulas and named ranges naming it name that |39| Files past the reader's limits (a zip bomb, 1 GB in one part, 2 GB in all, cells past XFD1048576) | Refused, with a message saying which |4041## Layout in Excel4243| 012 | Excel |44|---|---|45| Wrap | The cell format's `wrapText` |46| Clip | Nothing: Excel has no clipping, so the text overflows there |47| Borders: thin, thick, double | Borders in the styles part: `thin`, `medium`, `double`. Coming in, `hair`, `dotted` and the dashed lines read as thin, `medium`, `thick` and the medium dashed lines as thick |48| Border colors | The line's `color`, as the RGB the rules' colors write; coming in, the nearest named color by hue, and grays and black as Automatic |49| Vertical alignment: top, middle, bottom | The cell format's `vertical`: `top`, `center`, `bottom`; `justify` and `distributed` come in as automatic |50| A blank cell with borders | Written as a styled cell, and read, even after a row's last value |51| A row's height, in lines | `ht` in points, 15 to a line, with `customHeight`; coming in, only heights set by hand (`customHeight`) of more than a line, rounded to lines. Rows Excel fitted to their text fit it here too |52| Merged cells | `mergeCells`; the values Excel keeps under a merge's other cells come in but don't show |5354## Filters in Excel5556A sheet's filter goes out as Excel's AutoFilter over the same range, and57an AutoFilter comes in as a filter:5859| 012 | Excel |60|---|---|61| Filter by values: the values unchecked | The list of values shown (Excel keeps those checked), with blanks when they're shown. Values are compared as displayed, ignoring case |62| Is empty | Blanks only |63| Is not empty | Custom filter: does not equal a space |64| Text contains, does not contain, starts with, ends with, is exactly | Custom filter: equals or does not equal `*text*`, `text*`, `*text`, `text`, with Excel's wildcards in the text escaped (`~*`) |65| Greater than, less than, is equal to, is not equal to (and or equal to) | Custom filter with that operator; numbers typed as `$1,200` or `12%` go out as the number |6667The rows the filter hides are written hidden, since Excel shows a file's68rows as saved rather than filtering again. A column with both unchecked69values and a condition goes out as the list of values both let through,70and comes back as that list. What 012's filters can't do is left out,71with a note saying how many criteria and which: two conditions in one72column (`and`, `or`), wildcards other than at the ends of the text (`a?c`,73`a*c`), top 10, dynamic filters (above average, this month), dates74grouped by year or month, and filtering by color or icon. The filter75itself still comes in over its range. A table's filter is its own in76Excel: see [Tables in Excel](#tables-in-excel).7778## Tables in Excel7980A [table](../sheets/tables.md) goes out as an Excel table over the same81range, with its columns' names, and an Excel table comes in as a table:8283| 012 | Excel |84|---|---|85| The table's name | Its `name` and `displayName` |86| Structured references (`Sales[@Amount]`) | The same, with `@` written as Excel's files spell it: `Sales[[#This Row],[Amount]]` |87| Header style | Excel's default table style, `TableStyleMedium2`; coming in, any table style |88| Banded rows | Row stripes (`showRowStripes`) |89| A filter over the table's range | The table's filter, rather than the sheet's |90| A number in the header row | Written as the text it shows, which Excel needs of a header |9192Coming in, a totals row stays as cells below the table, and formulas93reading `[#Totals]` show `#REF!`; a table without a header row, or named94as a named range or another table is, is left out with a note.9596## Arrays in Excel9798A formula whose array spills (see [Arrays and spills](../formulas/arrays.md))99is written as Excel writes a dynamic array formula: an array formula over100the cells it spills into (`<f t="array" ref="C1:C9">`) on a cell whose101metadata marks it dynamic (`cm="1"`, defined in `xl/metadata.xml`), with102the values in the cells below and right of it, so Excel spills it the103same and older Excels show the values. Formulas calling array functions104(`FILTER`, `SORT`, `UNIQUE`, `SEQUENCE`, `LET`, `LAMBDA` and the like) or105holding an array literal are written that way even when they compute one106value, so Excel doesn't put its implicit intersection (`@`) in front of107them. Excel gets its own names for the functions newer than Excel 2007108(`_xlfn._xlws.FILTER`, `_xlfn.SEQUENCE`), `_xlpm.` before the names LET109and LAMBDA bind, and the formula inside an `ARRAYFORMULA` around a whole110formula, which a dynamic array formula computes over arrays anyway.111What Excel can't hold goes out as the value it showed, counted in the112download's note: functions only Sheets has (`SORTN`, `FLATTEN`, `SPLIT`,113`REGEXMATCH`, and `REGEXEXTRACT`, whose Excel namesake returns the whole114match where Sheets' returns the capture group), array literals holding115references (Excel's hold only constants) and `ARRAYFORMULA` inside a116formula.117118## Rules in Excel119120[Conditional formats](../sheets/rules.md#conditional-formatting) go out as Excel's121conditional formatting, and [data validation](../sheets/rules.md#data-validation)122as its data validation, and both come back:123124| Conditional format | Excel |125|---|---|126| Is empty, is not empty | `containsBlanks`, `notContainsBlanks` |127| Text contains, does not contain, starts with, ends with | `containsText`, `notContainsText`, `beginsWith`, `endsWith` |128| Text is exactly | `cellIs` equal to the text |129| Date is today, tomorrow, yesterday | `timePeriod` |130| Date is, is before, is after a date | an expression, `INT(A1)<DATE(2026,9,30)` |131| Greater than ... is not between | `cellIs` with the operator; dates as Excel's serial numbers |132| Custom formula is | `expression`, in Excel's syntax |133| Color scale | `colorScale` with its points (`min`, `max`, `num`, `percent`, `percentile`) |134| A rule's style | a differential style (dxf): bold, italic, underline, strikethrough, the text color and a solid fill |135136| Data validation | Excel |137|---|---|138| Dropdown, from a range | `list` of the items in quotes, or of the range (`Lists!$A$1:$A$20`) |139| Checkbox | `list` of `TRUE,FALSE`, which comes back as a checkbox |140| Number, date, text length | `decimal`, `date`, `textLength` with the operator; any date as a date greater than 0 |141| Custom formula is | `custom` |142| Reject the input, show a warning | error style `stop`, `warning`; help text as the prompt |143144Each single-color rule stops the ones after it (`stopIfTrue`) and its145priority is its place, so Excel applies the first that matches, as 012146does. Named colors go out in the colors of Sheets' palette, and Excel's147colors (ARGB, theme and indexed) come in as the nearest named color by148hue, grays as none; a color scale's gray or white point takes the nearest149scale color. Validation in Excel 2010's extension (lists from other150sheets) is read too; whole-number rules come in as number rules.151152Left out, with a note saying how many and which: conditional formats 012153has no rule for (data bars, icon sets, top or bottom values, above or154below average, duplicate or unique values, errors, date periods other155than today, tomorrow and yesterday, and what Excel 2010's extension156holds), rules whose style has only a number format or borders, time157validation and lists from named ranges or formulas. Going out, a158formula with no Excel equivalent (`#AND#`) leaves its rule out, and so159do list items with commas or quotes, or longer than Excel's 255160characters.