What is built
Every feature: built, partly built or missing.
What svelte-sheet can do, feature by feature, measured against Google Sheets, the reference for how a spreadsheet and its formulas behave. This is the one list of what is built and what is not; it changes with the code.
The library is the engine and the grid. The controls this list names (the toolbar, the formula
bar, the File menu) are the spreadsheet example's (examples/spreadsheet/src/lib/ui): an app
copies them or builds its own.
Yes: built. Partly: the core of it works, the rest of the line says what is missing. No: not built. Yes does not mean proven in daily use: the last section says how each part was checked.
The sheet
| Feature | Sheet | What is there, what is missing |
|---|---|---|
| Cells by address | Yes | B3, $B$3, A1:C3. A cell keeps what was typed; only cells that hold something are stored. |
| Size of a sheet | Partly | 100,000 rows by 702 columns (A to ZZ), fixed. Sheets holds 20 million cells. |
| Length of a cell | Partly | 5,000 characters. Sheets holds 50,000. |
| Numbers, text, booleans | Yes | 12, -1.5, .5, 1e3, 12%, TRUE; a leading apostrophe keeps text as text ('0123). |
| Dates and times | No | A date is text. No date arithmetic, no date formats. |
| Several sheets (tabs) | No | One grid per sheet; no Sheet2!A1. |
| Named ranges | No | |
| Merged cells | No | |
| Notes, links, pictures | No | A cell holds a value and a style. |
| Checkboxes, dropdowns | No | No data validation. |
| Insert and delete | No | Rows and columns cannot be inserted, deleted or moved; references are never rewritten for that. |
| Sort and filter | No | |
| Find and replace | No | |
| Charts, pivot tables | No |
Formulas
| Feature | Sheet | What is there, what is missing |
|---|---|---|
| Operators | Yes | + - * / ^ &, the six comparisons, a sign in front, % behind. Sheets' order: 2^3^2 is 64, -2^2 is 4. |
| Coercions | Yes | A blank is 0, "" or FALSE by its neighbour; text that reads as a number counts in arithmetic. |
| References and ranges | Partly | Cells and ranges, with $ anchors. Missing: whole columns and rows (A:A, 1:1), other sheets. |
| Functions | Partly | 33, listed below. Sheets has more than 400. |
| Lookup functions | No | No VLOOKUP, XLOOKUP, INDEX, MATCH. |
| Date and time functions | No | |
| Array formulas | No | A formula gives one value. A range where one value is expected is #VALUE!; nothing spills. No {1,2}. |
| Errors | Yes | #DIV/0!, #VALUE!, #REF!, #NAME?, #NUM!, #N/A, #ERROR! for a formula that does not parse. |
| Circular references | Yes | Every cell of the circle shows #CYCLE! (Sheets: #REF!), whichever cell is asked first. |
| Precision | Yes | Full double precision inside; 15 significant digits where a number is shown or compared. =0.1+0.2=0.3 is TRUE. |
| Long chains | Yes | A running total down all 100,000 rows works out; a chain of cells is not a deep call stack. |
| Recalculation | Partly | After a change every value is worked out again, each cell on first asking: the cells in view and what they read. A range is read only where the sheet is used. No dependency graph. |
| Copying a formula | Yes | Relative references move, anchored ones stay; one that leaves the sheet becomes #REF!. |
| Language of formulas | Partly | English function names and a decimal point for everyone; arguments split by , or ;. No localized names. |
| Formula help | No | No suggestions while typing, no argument hints, no coloured references, no picking cells with the pointer. |
The functions: ABS AND AVERAGE AVERAGEIF CONCAT CONCATENATE COUNT COUNTA
COUNTIF IF IFERROR INT LEFT LEN LOWER MAX MEDIAN MID MIN MOD NOT OR
POWER PRODUCT RIGHT ROUND ROUNDDOWN ROUNDUP SQRT SUM SUMIF TRIM UPPER.
Where a formula behaves differently from Sheets, beyond what is missing above:
- Text is compared letter by letter without regard to case, not in a language's alphabet.
- The criteria of
SUMIF,COUNTIFandAVERAGEIFknow no wildcards (*,?). CONCATtakes any number of arguments, ranges too (in Sheets: two values).- An argument cannot be left out between two separators (
=IF(A1,,1)does not parse). - Of the errors, only
#REF!can be written into a formula (=#N/Adoes not parse). - Brackets and calls nest 64 deep at most.
IFdoes not hand a range on.
How cells are shown
| Feature | Sheet | What is there, what is missing |
|---|---|---|
| Bold, italic | Yes | |
| Underline, strikethrough | No | |
| Typeface, size, colour | No | One typeface (the page's), one size, one ink. No fill colour, no borders. |
| Alignment | Partly | Left, centre, right; by content when not set (numbers right, text left). No vertical alignment. |
| Text that does not fit | Partly | Text runs on over empty cells to its right; numbers are cut at the cell's edge. No wrapping. |
| Number formats | Partly | Automatic, number, percent, euro, US dollar, with 0 to 10 decimal places. No custom formats. |
| Numbers by language | Yes | Shown with the reader's separators; a number typed with a decimal comma is one where that is usual. |
| Conditional formatting | No | |
| Column width | Yes | 48 to 640 px, by dragging the edge of a column's letter or from code. No fit to content. |
| Row height | No | Every row is 30 px high; that is what lets the grid draw only the rows in view. |
| Freezing, hiding, grouping | No | The column letters and row numbers stay in view; no frozen rows or columns of cells. |
| Light and dark | Yes | scheme on the grid: light, dark, or the system's. |
The grid
| Feature | Sheet | What is there, what is missing |
|---|---|---|
| Drawing only what shows | Yes | Only the rows and the columns in view, and of those only cells with something in them. |
| Selecting | Partly | A cell or one range: pointer, drag, Shift click, arrows, Shift arrows. Missing: whole rows and columns, several ranges. |
| Moving by key | Partly | Arrows, Tab, Page Up and Down, Home, Ctrl Home, Ctrl A (the used part). Missing: End, Ctrl with an arrow. |
| Typing into a cell | Yes | Typing opens the cell; Enter or F2 opens it with what is in it; Enter, Tab, Escape close it. Double click too. |
| Input methods | Partly | One entry field holds the focus the whole time, so composed and dictated text arrives like typed text. Not tried. |
| Formula bar | Yes | In the example: the selection's name and what is typed in the cell. |
| Undo, redo | Yes | Only your own changes; one action is one step. |
| Copy, cut, paste | Partly | As text through the system clipboard (what the cells show, tab separated). Inside one sheet, formulas and styles come along. Missing: formats to and from other programs, paste special. |
| Fill handle | No | No dragging a cell's corner to fill. |
| Right-click menu | No | |
| Touch | Partly | The grid scrolls, a tap selects and two taps open a cell (the grid counts them itself), in Chrome's and Firefox's emulation of a touch screen. Not tried on a phone. |
| Screen readers | Partly | A grid with row and column counts; the entry field says the selected cell and what it shows. Not audited. |
| Words in other languages | Yes | What the grid says is passed as labels; English by default. |
Files
| Feature | Sheet | What is there, what is missing |
|---|---|---|
| A sheet file | Yes | Plain JSON by address, with formulas, styles and column widths; a file read back gives the same sheet. |
| CSV out | Yes | The values as worked out. Text another program would run as a formula gets a leading apostrophe. |
| CSV and TSV in | Yes | Comma, semicolon or tab, found from the file; quotes; a semicolon file's decimal commas are read as numbers. |
| Excel files | No | No .xlsx, no .ods. |
| Print, PDF | No |
More than one person, and agents
| Feature | Sheet | What is there, what is missing |
|---|---|---|
| Changes cell by cell | Yes | Every change is a diff of records with its source (user, remote); two writers of different cells both keep their work. |
| A sync | No | The library sends nothing anywhere. An app listens to the store and puts in what arrives; the README shows how. |
| Conflicts | No | That is the sync's to decide. With records per cell, the usual rule is last write wins per cell. |
| The others' cells | Yes | The grid draws each peer's range, cell and name flag in their colour. Where they are is the app's to know. |
| Comments, history | No | |
| Edits from code | Yes | applySheetOps: clear, write, format and widths by address, from unchecked JSON, refused with a code when wrong. |
| Reading from code | Yes | readSheet gives what is typed and what it shows; sheetErrors lists the cells that show an error. |
| Working it from code | Yes | Editor is part of the engine: selecting, typing, every key, copy and paste and undo run in a script or a test, no grid. |
How it was checked
In Node (pnpm test), 145 tests:
- The formula engine: 63 tests, written against what Google Sheets does: operators and their order, coercions, every function, errors, circles, a chain down all 100,000 rows, copying. Every function over a range is worked out twice on sheets made by chance, reading every cell it names and reading only the used part, and gives the same.
- The sheet, files, CSV, number formats, edits from code: 42 tests, among them two sheets kept in step through the store's diffs, undo that takes back only one's own changes, and that a file's rows become the same records, with the same refusals, as writing them to an empty sheet, and that whoever follows a sheet's values hears of a cell typed outside the part that was used.
- The editor: 28 tests drive it as the grid and a toolbar do, on the source with no Svelte and no browser: typing and keeping an entry, the selection, every key, the reader's language, formats, copy, cut and paste, undo steps, a document loaded whole, the cells of the columns in view, and that a reader of the sheet follows one signal however many cells it looked at.
- What the editor reads: 4 tests. The editor keeps what it reads up to date change by change. After each of 2,400 steps taken by chance (typing, emptying, cutting, pasting, styles, widths, undo and redo, a script's block, someone else's change, a document loaded) it reads the same as an editor handed the same records fresh, and the same as the store read record by record. Typing into a sheet of 36,000 cells takes no snapshot of the store.
- The package as it ships: 5 tests read the built package the way an app does: the list of
what the engine exports, a sheet and an editor worked from
distwithout Svelte, and that the engine imports nothing from outside but the store. - The grid's markup: 3 tests render
Gridto HTML on the server and read it.
In a browser (pnpm test:browser), 23 tests work the built example in Chrome, with a pointer
and keys, and save pictures of what they saw to pictures/. The same 23 pass in Firefox, where
they run only when asked for (pnpm test:browsers). A change redrawn is checked here too: the
editor's values are signals, and only a browser shows that the grid follows them:
- The page: the grid fills the page under the tools and never makes the page scroll; a cell, the ring and the open cell's field have the measures the grid counts with; light and dark, by the system's setting.
- An app's colours: a rule of an app's that stands before the library's stylesheet still wins over the defaults, the selection follows the app's ink, and what the app did not set keeps its default.
- Only what shows: about a screenful of rows is in the page, at the top of a sheet and 400 and 900 rows down; the letters and numbers stay in view while the cells scroll.
- Selecting: a click, a drag, a Shift click; arrows, Shift with arrows, Tab, Home, Ctrl Home, Page Down, Ctrl A, Escape; the sheet scrolls to the selected cell and grows with it.
- Typing: typing opens the cell, Enter, Tab and Escape close it, Enter, F2 and a double click open it with what is in it; a formula works out and what depends on it follows; Delete, undo and redo; a number with a decimal comma in German.
- The clipboard: Ctrl C, X and V through the browser's clipboard: what the cells show goes out, cells pasted in the sheet bring formulas and formats, text from elsewhere is typed in; in an open cell they are the field's own.
- A column's width: dragged by the edge of its letter, shown while dragged, kept on release, held at the least width, undone.
- The example's controls: the toolbar formats the selection and leaves the keys with the grid, its menu hands them back, a tool names itself when pointed at; the formula bar writes into the cell; the File menu opens a CSV as the sheet, refuses a file that is none, and downloads the sheet and a CSV; the sheet is kept in the browser over a reload; the links to the documentation and to the code stand at the far end of the tools, each names itself, and a press on one leaves the keys with the grid.
- Other people: their cell, range and flag in their colour, out of the pointer's way.
- A phone's width (the browser's emulation of a touch screen): the page fits, the tools scroll sideways and are larger, a tap selects, two taps open a cell. A tap on the cell beside it first, or a second tap a moment later, do not.
- A grid with almost no room: a cell wider or taller than the grid is shown from its start, and the sheet is not scrolled when it appears.
- A sheet of 12,000 cells (1,000 rows by 12 columns, a twelfth of them formulas, and one cell that adds up all of them): a change and a jump to the last row are each drawn within a frame or two, and about a screenful of rows is in the page.
- A wide sheet (200 rows by 600 columns): fourteen columns' letters and about 400 cells are in the page, at the start and at the far end; a jump across is drawn within a frame or two, and a press there selects the cell under it. Words in a cell left of the columns in view run on into view, and end at the next cell that holds something.
- The last of 100,000 rows: the grid is three million px tall, the last row is reached, shown at the bottom with its number, and typed into.
- A sheet the size of a 5 MB file (33,000 rows by 20 columns, 660,000 cells): loading it into the editor takes about a second; a total over a whole column, a change to one of its numbers and a jump to the last row are each drawn in the next frame, with fewer than 400 cells in the page.
The documentation site has 9 tests of its own in the same run, on the built pages: every page opens with its title, and at a phone's width none is wider than the screen; the sheet on the home page does not take the keys when the page opens, and works when pressed (a number typed, the totals following, undo from the toolbar); light, dark and a phone's width with the pages behind Menu; every example on the scripting page runs the code it shows; the formulas page works its examples out and lists the engine's own functions; the reference has the editor, the sheet and the grid from the source; the demo opens beside the site; an address with no page says so. Three more tests read the built pages as files, with no browser: every page says where to change it, and every link into the repository names a file that is there.
Types and build: the package, the example and the site type-check (pnpm check), the
package is built by svelte-package and passes publint, and the example and the site build with
Vite.
Not checked:
- Safari, and any browser on another system or on a phone. Besides Chrome, the example's tests were run in Firefox 159 as the test tool builds it, on Linux and without a window; touch there, as in Chrome, is the browser's emulation. WebKit, Safari's engine, was not run. The number of rows a sheet holds comes from how tall an element a browser lays out; that 100,000 rows fit was seen in Chrome and in Firefox.
- Memory in a browser. In Node a sheet takes a little under 400 bytes for each filled cell (256 MB for 660,000 cells, 743 MB for two million), most of it the store's record and signal per cell.
- What works on a range cell by cell and is not held back by the size of a sheet any more: a style set on a range writes a record for every cell of it, an agent's read gives every cell of the range it names, a copy takes every cell of the selection. On all 660,000 cells of a sheet, in Node: a copy takes 1.5 seconds, a style 5, emptying it 4, and the undo of either 3. The last three are a write to the store per cell.
- A real phone or tablet: the on-screen keyboard, a finger's drag, pinch zoom.
- Input methods and dictation (the entry field is built for them; nobody composed text in it).
- A screen reader, and an accessibility audit.
- The clipboard to and from another program (the tests copy and paste within one page).
- Daily use: nobody has worked in a sheet with this for a day.