Repository navigation
v0.15.0
The fixes of a QA pass over v0.14.0: 180 findings, from six testers and LibreOffice as the oracle for 66,000 formulas. This release fixes the 23 critical ones and most of those rated high. Hosts that show files from other people should update: two findings let a file run script in the host's origin or take the tab down.
Security
- An SVG picture ran its script as the host application. A picture was shown from a
blob:URL, which carries the origin of the page that made it: Open image in new tab on an SVG (a.svgfile, or one inside a document, workbook or presentation) ran the SVG's script in the host's origin, where it could read the host's storage. An SVG is now shown from adata:URL, whose document has an origin of its own. Every version up to v0.14.2 is affected. A host with a content security policy needsimg-src data:for SVG pictures to show. - Files that take the tab down. A list numbered from 2,147,483,647 in Roman numerals (a 3.6 KB file) made megabytes of text per marker; markers past what a format spells are the number itself (documents, presentations, Pages). The XML reader copied a long run of text, a comment or a tag again with every chunk it spans: a 300 KB document holding 300 MB of whitespace ran out of memory. Text and comments are passed on chunk by chunk, a tag is read once, and a tag over 16 MB is refused.
=FACT(1E15)never came back, and Save with it: a factorial past 170 is#NUM!at once. A pane frozen a million rows down is shown frozen as far as it fits. Coordinates outside the sheet no longer hang the grid (#25). - Links: a link that runs code (
javascript:,data:,vbscript:…) is not written into a document (it was shown as text, but kept in the saved file); a scheme spelled with HTML entities (javascript:) is recognized.
Spreadsheets: the saved file
- Cells typed into a row that had some were written out of column order (D1, C1, B1), which Excel repairs or refuses.
- The values of the formulas an edit recomputed are saved, in every sheet. The file kept the old ones: reopened, or read by a program that does not compute, it showed stale totals.
- Sheets added, deleted or moved: the defined names (
localSheetId) and the views (activeTab) follow their sheets. LibreOffice refused such files. - A workbook listing chart or dialog sheets: renaming, deleting, moving and adding act on the sheet meant. They acted on another one, and deleting left the workbook pointing at a part that was gone.
- Merged cells of a filtered sheet are written after the filter, not inside its sort state.
- A workbook with macros, a template or a slide show is saved as what it is:
OpenResult.extgives the extension (xlsm,xltx,docm,potx,ppsx…), the viewer names the file with it, and the Blob has its media type. Saved as.xlsx, a workbook with macros is one Excel refuses to open. The macros are kept. 1e999stays text (the file saidInfinity); rows and columns are not inserted when that pushes filled cells off the sheet; functions newer than the format are saved with their_xlfn.prefix (XLOOKUPtyped here was#NAME?in Excel); a sheet name takes no apostrophe at its ends; the last sheet that shows cannot be deleted; a deleted sheet takes the calculation chain with it.- Undoing an insert or a delete of rows / columns puts back the formulas of the other sheets.
- What points at cells follows them when rows / columns are inserted or deleted, and names a renamed sheet as it is called: defined names and print areas, filters, hyperlinks, data validation, conditional formats, page breaks, tables (a column inserted in one is its column), the anchors of pictures and charts, the cells charts draw. Array formulas stay array formulas.
Spreadsheets: calculation
- After a sheet was added, moved, renamed or deleted, formulas across sheets computed with another sheet's cells, or stood still, and the wrong values were saved. A deleted sheet is
#REF!in what read it. - Every sheet is read before the first edit: a lookup into a sheet not shown yet read blanks.
- Shared formulas (what Excel writes for a filled column) compute, show their formula, and keep it when formatted, typed over and undone. Array formulas fill their cells again.
- A workbook that says to compute on load (XlsxWriter, pandas, this engine) is computed when opened. It showed 0 for every formula.
INDIRECT,OFFSET,NOW,TODAY,RANDandRANDBETWEENcompute at every change.- A function the engine does not have, a defined name or a structured reference: the formula keeps the value the file holds. It became
#NAME?at the first edit nearby, andIFERRORaround it answered 0. - Functions given an array where they take one value compute per element:
SUMPRODUCT(1/COUNTIF(r,r)),SUM(COUNTIF(r,{"x","y"})),SUM(LARGE(r,{1,2,3})),VLOOKUP(x,CHOOSE({1,2},names,ids),2,0). They took the first element, silently. - A column where each row adds to the one above computes past 600 rows (it overflowed the stack:
#VALUE!down the column). - An edit in a sheet with a formula per row no longer takes minutes: finding what reads a cell looked at every range of the sheet, for every cell on the way.
=SUM(A:A)reaches every row of a sheet longer than Excel's limit (a large CSV).TEXT()shows large numbers as cells do (#24:1E+21was999999999999999868928.00).
Spreadsheets: typing, the clipboard, sorting
- Delete, Cut and Copy on a whole column or sheet act on every row. They acted on the rows the view had loaded (some 128) without a word.
- Cells copied within a workbook are pasted as they are: exact values (3.14159 was pasted as the 3.14 shown), formats, formulas. Cells cut are moved: what read them reads them where they are now.
- Clipboard text from Excel or Google Sheets: a quoted cell with line breaks is one cell.
- A cell formatted as Text keeps what is typed (the leading zeros of a phone number). A date that is none (
31/02/2024) stays text instead of becoming another date,1/15/2024is the 15th of January, and a workbook counting from 1904 gets the date typed. A date or a percentage typed into a cell without a format shows as one; 50 typed into a percentage cell is 50%. - Sorting sorts the rows of the table around the selection, whole, and leaves its header on top. A column selected alone was sorted apart from its rows.
- Replace puts the text as it is (
$&meant something). A decimal comma in the font size is a decimal point:12,5was 125 pt (#17).
Documents
- Editing a paragraph keeps what the editor does not model: an emoji Word 365 writes through
mc:AlternateContent(it was deleted from the file), fields (DATE,MERGEFIELD…), hidden text, ruby, equations, and run properties such as the language. Fields, ruby and equations are kept as their XML: they cannot be edited inside. - Tracked changes: deleting text another author inserted keeps the insertion, so rejecting restores the right text.
- Deleting the table row a vertical merge starts in hands the merge to the next row.
- RTF: text in the Symbol and Wingdings fonts is shown (it was deleted).
Markdown and HTML
- A file edited as a document keeps its tables, nested lists, pictures, code blocks, quotes and front matter when saved: what was not edited is kept byte for byte, and only the paragraphs edited are written from the document. One typed character lost them all.
- A backslash escape is read as the character it escapes. It grew from one backslash to three, then seven, with every pass between the source and the document.
Presentations
- Saving or downloading right after typing no longer writes the file without the last edit (#18, fixed in #21). A slide edit the worker refuses every time is given up after three tries instead of failing every later save.
Contributed
#21 (saving presentations), #23 (theme colors where color-mix() is missing), #24 (large fixed decimals) and #25 (coordinates outside the sheet), with follow-ups here: files written loosely lose no cell to the coordinate checks (a cell whose reference names another row, a column record past the last column, an anchor without offsets). Thank you.
For integrators
OpenResult.ext: the extension of the saved file when it is not the plain one of its kind. A host that names saved files itself should use it.- New sheet operations
clearandpaste, and the methodsxlsx.copyandxlsx.region. In a collaboration room every client needs this version: an older one does not know the new operations. - The first edit of a workbook reads its other sheets; a workbook saying to compute on load reads them when opened.
- Handlers of the XML reader get a long text in several calls.
- Markdown:
\before punctuation is an escape, as in CommonMark. - Not fixed yet from the pass: printing a table row taller than a page, and most findings rated medium or low. No new dependency.
What's Changed
- fix(xlsx): render large fixed decimals without binary artifacts by @mkroemer in #24
- fix(pptx): flush pending edits before saving by @mkroemer in #21
- fix: add theme color fallbacks and compatibility notes by @mkroemer in #23
- fix(xlsx): prevent malformed coordinates from hanging the grid by @mkroemer in #25
Full Changelog: v0.14.2...v0.15.0