SPB Git

Repository Public

excel.md 26.9 KB

# Compatibility with Microsoft Excel

What ORIX Sheet reads, writes, preserves and drops from Excel workbooks, and where the grid, the calculation engine, number formats and keyboard shortcuts behave differently from Excel.

Ground rule of this page. Microsoft Excel was never run during the development of ORIX Sheet. "Excel does X" below means: X is what Microsoft documents, what the OOXML specification states, or what the package authors cite; it was not observed on a live Excel by this project. XLSX files written by ORIX Sheet were checked with openpyxl 3.1.5 and headless LibreOffice 26.8.2 only. Nothing here claims that Excel opens these files without a repair prompt.

Related: formats.md (all formats, limits, timings), formulas.md (the function catalogue and per-function deviations), ../mathematics/numerical-precision.md, ../architecture/persistence.md (import-as-untitled, export preflight).

# 1. How an Excel file is handled

Opening an .xlsx or .xlsm file imports it into an untitled ORIX workbook; the original is never modified. All formulas are recalculated by ORIX Sheet's engine at import (cached values in the file are replaced by ours). Anything that could not be kept is listed in the import report. Writing Excel files is File ▸ Export To, preceded by a preflight report.

Parts that ORIX Sheet does not model are kept as raw bytes (PreservedParts), stored inside the .orixsheet document, and written back on export to XLSX/XLSM. They are never interpreted.

# 2. XLSX / XLSM feature matrix

Legend: R read into the model · W written from the model · P preserved byte-for-byte, not interpreted, not displayed · ≈ approximated, with an issue in the report · ✗ dropped, with an issue.

# Cells, formulas, values

Feature Read Write Notes
Numbers, text, booleans, errors R W the ORIX-only error #CIRC! is written as #NUM!
Shared strings, inline strings R W (shared) rich-text runs flattened to plain text (≈); phonetic runs ignored
ISO date cells (t="d") R – converted to serial numbers; a date format is added when the cell has none
Date systems 1900 and 1904 R W
Formulas with cached values R W at import in the app, every formula is recalculated; a formula written without a cached value sets fullCalcOnLoad
Shared formulas R (expanded) – written back as ordinary formulas
Legacy array formulas (Ctrl-Shift-Enter) ≈ – become dynamic arrays; written back as dynamic arrays
Dynamic arrays R W cm attribute + xl/metadata.xml, spill range in ref, spilled cells as cached values. Not verified in Excel
Functions newer than Excel 2007 R W _xlfn., _xlfn._xlws., _xlpm. prefixes handled; A1# ⇄ _xlfn.ANCHORARRAY, @x ⇄ _xlfn.SINGLE
Functions ORIX Sheet does not implement R W formula and cached value kept, one warning per function; the cell evaluates to #NAME? after recalculation
Formulas with external references ([1]Sheet!A1) ✗ – replaced by the cached value, loss issue
What-if data tables ✗ – cached values kept, loss issue
Defined names (workbook and sheet scope, hidden, comment) R W

# Formatting and layout

Feature Read Write Notes
Fonts, solid fills, borders, alignment, protection flags R W styles deduplicated on write
Theme colours with tint, indexed colours R (resolved to RGB) W as RGB the theme itself is preserved (P); the link between a cell and a theme colour is not
Gradient and patterned fills ≈ – first stop / foreground colour
Diagonal borders, stacked vertical text ✗ –
Text rotation, shrink to fit R W stored and round-tripped, not rendered by the grid (section 4)
Number formats R W built-in ids 0–22 and 37–49, custom formats from id 164
Column widths, row heights R W points = width × 5.25
Hidden rows/columns, outline levels, collapsed state R W there is no outline (group) user interface in the grid
Row and column default styles R W
Merged cells R W overlapping merges dropped on write
Frozen panes, zoom, gridlines, headings R W split (non-frozen) panes ignored
Tab colour, hidden sheets, active sheet R W veryHidden becomes hidden
Sheet protection R (flag) W (flag) the password hash is not kept; enforcement is partial (section 4)
Page setup, margins, header/footer, print options, page breaks R W paper sizes Letter, Legal, Tabloid, Executive, A3, A4, A5, B4, B5; header/footer font codes ignored when printing
Print area, print titles R W several print areas are merged into their bounding range

# Sheet features

Feature Read Write Notes
Hyperlinks (external, internal, tooltip) R W at most 65,530 per sheet
Data validation, including cross-sheet lists R W long titles and messages truncated; inline lists over 255 characters dropped
Conditional formatting R W cellIs, expression, colorScale (2–3 points), dataBar, iconSet, top10, aboveAverage, duplicate/unique, containsText, blanks, errors; differential formats: bold, italic, strike, colour, fill, number format. Other text/time rules are read as their equivalent formula. x14 extensions (negative bar colours, custom icons) ✗
AutoFilter R (range) W filter criteria ✗; rows they had hidden stay hidden
Tables R W name, range, header/totals rows, columns, totals functions, calculated-column formula, style name
Notes (legacy comments) R W
Threaded comments ≈ W as notes replies merged into one text
Document properties (core) R W

# Content that is carried, not understood

Feature Read Write Notes
Charts, images, shapes (DrawingML) P P not displayed, not editable, not updated when cells change
Pivot tables and caches P P dropped if their sheet is deleted
VBA project P P in .xlsm, ✗ in .xlsx never executed
External link definitions P P never fetched
Custom XML, custom document properties, theme P P
Chart sheets, macro sheets, dialog sheets ✗ – warning at load
Sparklines, slicers, timelines, form and ActiveX controls, OLE objects, sheet background, data connections ✗ – warning at load
Workbook-level protection, custom views, scenarios, ignored-error flags ✗ – not modelled

# ORIX Sheet content that XLSX cannot hold

Content On export
ORIX charts, figures and pivot tables (SheetObject) ✗ — "not exported to XLSX yet" (loss)
Attachments (Python scripts, queries, workflows) ✗ (loss)
Cells holding a LAMBDA value written as #CALC! (loss)
Text longer than 32,767 characters truncated (loss, with the cell address)

Source for the five tables above: Packages/SheetIO/COMPATIBILITY.md (each row is backed by a test in Packages/SheetIO/Tests/SheetIOTests, per that document) and Sources/SheetIO/Preflight.swift. Spot-checked in the code for this page: #CIRC! → #NUM! (WorksheetWriter.errorText), veryHidden → hidden (XLSXReader), the 5.25 factor (SheetUnits), the limits (ExcelLimits), .xlsb refusal (FileFormat.detect → .xlsb, WorkbookReader.load), rotation and shrink-to-fit read and written (StylesReader, StylesWriter) and absent from Packages/SheetUI/Sources.

A consequence worth spelling out: a workbook with Excel charts imported into ORIX Sheet shows no chart; the charts reappear only when the workbook is exported back to XLSX and opened in a program that renders them, and they still refer to the original ranges.

# 3. Calculation engine differences

Each item was checked in the source and, where marked run, by a scratch program linking SheetCore on 2026-11-21 (the observed result is quoted).

# Deliberately different

Topic Excel ORIX Sheet Verified
Circular references warning dialog, cell shows 0; optional iterative calculation every cell of the cycle evaluates to the error #CIRC! (CellError.circular, ERROR.TYPE 15). No dialog run: A3: =A3+1 → #CIRC!
Iterative calculation optional (maximum iterations / maximum change) not implemented; the workbook setting is not read from XLSX no occurrence of an iteration setting in SheetCore or SheetIO
Whole-column and whole-row references (A:A, 1:1) conceptually all 1,048,576 rows clamped to the used part of the sheet when turned into arrays or iterated (EvalContext.effectiveRange). Aggregates give the same result; functions that return the shape of the reference see the clamped shape code
Multi-threaded recalculation yes no: one calculation thread ../architecture/calculation-graph.md

Source: Packages/SheetCore/Sources/SheetCore/Engine/CalcEngine.swift (need, store), Engine/Evaluator.swift (effectiveRange), Model/Value.swift (CellError); scratch run of 2026-11-21.

# Not implemented

Feature What happens Verified
3-D references (Sheet1:Sheet3!A1) the formula parses and evaluates to #NAME? run: =SUM(Sheet2:Sheet3!A1) → #NAME?
Intersection operator (space) the formula is rejected by the parser run: =B1:B3 B2:C2 → parse error
Union operator (comma inside parentheses) and multi-area references rejected by the parser; AREAS always returns 1 run: =SUM((B1,B2)) → parse error
External workbook references rejected by the parser; on XLSX import the cached value is kept run: =[1]Sheet1!A1 → parse error
R1C1 reference style R1C1 is read as a name run: =R1C1 → #NAME?
What-if data tables (TABLE) cached values kept on import package document
VBA, Office Scripts, XLL add-ins, user-defined functions in other languages macros are preserved in .xlsm and never run. LAMBDA and LET are implemented; Python runs in a separate process (../architecture/python-runtime.md) and is not Excel's PY code
Localised function names function names are English in every locale; only the decimal and argument separators change (period/comma or comma/semicolon) FormulaSyntax, FormulaPrinter
GETPIVOTDATA, CUBEVALUE, RTD, WEBSERVICE, FILTERXML, IMAGE, STOCKHISTORY, linked data types not registered: #NAME? no registration of these names in Packages/Functions*/Sources or SheetCore (grep, 2026-11-21); complete list in formulas.md

Source: Packages/SheetCore/Sources/SheetCore/Formula/Parser.swift, Formula/Printer.swift; scratch run of 2026-11-21; function registrations searched with grep in Packages/Functions*/Sources.

# Same as Excel (implemented quirks)

Topic Behaviour Verified
Unary minus binds tighter than ^ =-2^2 is 4 run
^ is left-associative =2^3^2 is 64 run
A formula whose result is an empty cell displays 0 =B50 (empty) is 0; the same rule applies inside spilled arrays run; CalcEngine.store
Percent postfix operator =50%*2 is 1 run
Text that looks like a number is coerced by arithmetic operators, booleans count as 1/0 ="3"+1 is 4, =TRUE+1 is 2 run
No coercion in comparisons; type order number < text < boolean =1="1" is FALSE, =1<"a" is TRUE, ="a"<TRUE is TRUE run
Text comparison ignores case ="a"="A" is TRUE run
0^0 #NUM! run
1900 date system with the 29 February 1900 leap-year bug; 1904 system serial 60 is 29 Feb 1900 DateSerial
Dynamic arrays and #SPILL! a result array spills from its anchor; it is blocked — and the anchor shows #SPILL! — by any non-empty cell, formula, other spill, merged cell or table in the target area, or by the edge of the sheet; the spill re-attempts when the obstacle is removed CalcEngine.store, touchSpills; run: ={1,2;3,4} spills
SUBTOTAL / AGGREGATE and hidden rows not volatile; re-evaluated when rows are hidden, unhidden or filtered (CalcEngine.markVisibilityDependents, called from editMeta and from undo) code
Implicit intersection @ @A1:A10 picks the cell on the formula's row (or column) Evaluator
Nesting limit 64 levels of nested expressions in the parser (Excel documents 64 nested functions) FormulaParser.maxDepth

Source: Formula/Parser.swift (precedence table in binaryOp, parseUnary, maxDepth), Engine/Evaluator.swift (binary, .implicit), Model/Value.swift (compareValues, TextOrder), Model/DateSerial.swift, Engine/CalcEngine.swift (store, touchSpills, markVisibilityDependents); scratch run of 2026-11-21.

# Floating-point comparison

Comparison operators compare IEEE-754 doubles exactly (compareValues). Run: =0.1+0.2=0.3 is FALSE in ORIX Sheet. Microsoft documents that Excel treats values that agree to 15 significant digits as equal in some comparisons and results near zero (stated from Microsoft's documentation; not verified against a running Excel for this document); ORIX Sheet applies no such adjustment in operators. Displayed values and ROUND do use the 15-significant-digit decimal expansion, so 0.1+0.2 is displayed as 0.3. See ../mathematics/numerical-precision.md.

# Function-level deviations

They are listed per function in formulas.md; the package documents are Packages/FunctionsNumeric/COMPATIBILITY.md, Packages/FunctionsText/COMPATIBILITY.md and Packages/FunctionsLookup/COMPATIBILITY.md. The ones most likely to surprise an Excel user:

  • Dates given as text to financial functions are #VALUE! (Excel parses them); date text in criteria and in DATEVALUE is read as ISO or month/day/year regardless of the locale.
  • Text comparison (operators, lookups, SORT) is case-insensitive and uses one fixed collation on every Mac (TextOrder): accented letters sort next to their base letter ("e" < "é" < "f"), while equality stays strict apart from case ("é" ≠ "e"). Excel uses the collation of the system locale, so the order of some strings can differ on a non-English system.
  • CHAR / CODE follow Windows-1252, not Mac OS Roman as Excel for Mac does.
  • Regular-expression functions use ICU syntax (Excel uses PCRE2).
  • Iterative financial functions (for example IRR, RATE, YIELD) converge more tightly than Excel (which stops at 1e-7) and may return a value where Excel returns #NUM!.
  • Bessel functions are accurate beyond Excel's roughly 7 digits, so results differ after the 7th digit.
  • MOD, SIN, COS… have no #NUM! limit on large arguments.
  • CELL and INFO support a subset of types.
  • Not registered: ODDFPRICE, ODDFYIELD, ODDLPRICE, ODDLYIELD, AMORDEGRC, AMORLINC, GETPIVOTDATA. (ISOMITTED is registered, by FunctionsNumeric.)

Source: the three package documents named above ("Known deviations from Excel", "Known limits and deviations (financial)").

# 4. Grid and user-interface differences

Verified in Packages/SheetUI/Sources/SheetUI unless stated otherwise.

Topic ORIX Sheet
Opening and saving Excel files imported as untitled; Save writes .orixsheet only; XLSX is an export
Default cell size new workbooks: 80 pt columns, 20 pt rows (Excel: 8.43 characters = 48 pt, 15 pt). Imported XLSX files keep Excel's defaults
Text rotation stored, not drawn (text is horizontal)
Shrink to fit stored, not applied
Horizontal alignment Fill, Distributed drawn as left-aligned
Center Across Selection drawn centred in its own cell only
Vertical Justify / Distributed drawn as centred
Double and accounting underlines drawn as a single underline
Accounting formats with * fill the fill character is not expanded: the currency symbol is not pushed to the left edge
_x in number formats always one ordinary space, not the width of x
Numbers too wide for the cell refitted (General drops decimals, then uses scientific notation), then ####, as in Excel; text overflows into empty neighbours, numbers never do
Rich text inside a cell not supported: one font and colour per cell
Embedded Excel charts, images, shapes, pivot tables not displayed (preserved for export)
Outline / grouping levels are stored; no group or ungroup command and no outline bar
Split panes not supported; frozen panes are
Sheet protection the flag blocks starting an edit in a locked cell (WorkbookSession.beginEdit). Paste, clear, fill, structural edits and formatting are not blocked; there is no password
AutoFilter filtering exists as ORIX Sheet's own table/filter panel; Excel filter criteria are not imported and there are no in-cell filter buttons drawn by the grid
Insert rows / columns one operation inserts at most 10,000 rows or 1,000 columns
Dates typed into cells ISO dates, numeric dates in the locale's day/month order and dates with an English or French month name are recognised; the cell receives a fixed format chosen from the way the date was typed (yyyy-mm-dd, m/d/yyyy, dd/mm/yyyy, d mmm yyyy, mmm yyyy, d mmm), not the system short-date format. Two-digit years below 30 are 20xx, others 19xx
TRUE / FALSE typed into cells VRAI / FAUX are also accepted, in every locale
Error indicators (green triangles), ignored-error flags not present; auditing is a separate panel
Status-bar aggregates present (SelectionSummary: sum, average and counts of the selection)
Flash Fill, threaded comments, co-authoring, sharing not implemented

Source: Grid/CellPainter.swift, Session/WorkbookSession.swift, Engine/InputParser.swift (SheetCore), Model/Workbook.swift (default sizes), Packages/SheetFormat/COMPATIBILITY.md.

# Number formats

The format engine (Packages/SheetFormat) implements Excel's format-code grammar: up to four sections, conditions, the eight named colours and [Color 1]–[Color 56], digit placeholders, thousands scaling, percent, scientific and engineering notation, fractions, literals, text sections, date and time tokens including elapsed [h] [m] [s], and General. Known differences from Excel, from Packages/SheetFormat/COMPATIBILITY.md:

  • Codes are interpreted in the invariant en-US grammar. The locale supplies separators and month/day names; a locale id in [$-409] does not switch the language of names.
  • [DBNum], [NatNum], Buddhist and era tokens (b, e, g) and the system formats [$-F800] / [$-F400] are accepted and ignored.
  • The sign rule for formats with explicit conditions follows the behaviour documented by Apache POI; not checked against Excel.
  • Fractions use a continued-fraction algorithm; denominators are limited to five digits.
  • Unquoted letters that are not format tokens are treated as literals (Excel refuses such codes).
  • General in a narrow cell is fitted by character count, not by the pixel widths of a proportional font.

Built-in format 14. SheetIO and the format engine share one built-in table (SheetFormat.BuiltinFormats). Id 14 is m/d/yyyy and id 22 m/d/yyyy h:mm, so a date cell that relies on the built-in id shows as, for example, 3/15/2026 after import, as Excel does in en-US. Excel uses the system short date for id 14; ORIX Sheet always uses the en-US form. On export m/d/yyyy is written back as id 14. (ECMA-376 Part 1 §18.8.30 prints mm-dd-yy and m/d/yy h:mm for these ids; those literal codes are kept as custom formats when a workbook uses them.)

# 5. Keyboard shortcuts

ORIX Sheet's shortcuts are defined in three places: GridView.keyDown and performKeyEquivalent (Packages/SheetUI/Sources/SheetUI/Grid/GridView+Events.swift), the menu bar (App/Sources/MainMenu.swift) and the actions that features register (WorkspaceAction.shortcut). The in-app list is HelpView.shortcuts in App/Sources/Welcome.swift.

The "Excel for Mac" column is Microsoft's published shortcut list for Excel on macOS as known to the author of this page; it was not checked against a running Excel and Excel's defaults change between versions.

# Same as Excel for Mac

Action Shortcut
Move, extend selection arrows, ⇧ + arrows
Jump to the edge of the data region (and extend) ⌘ + arrow or ⌃ + arrow (with ⇧ to extend)
Edit the active cell F2 or ⌃U; double-click
Commit and move down / up / right / left Return / ⇧Return / Tab / ⇧Tab
Fill the selection with the entry ⌃Return
Line break in a cell ⌥Return
Cancel an entry Esc
Select row / column ⇧Space / ⌃Space
Select all ⌘A (region, then sheet)
Go To ⌃G
Fill down / right ⌘D / ⌘R
Bold, italic, underline, strikethrough ⌘B, ⌘I, ⌘U, ⇧⌘X
Cut, copy, paste, undo ⌘X, ⌘C, ⌘V, ⌘Z
Find ⌘F (opens the find-and-replace bar)
Create a table ⌘T (Data ▸ Convert to Table…)
Page up / down Page Up / Page Down
New, open, close, print ⌘N, ⌘O, ⌘W, ⌘P
Recalculate ⌘= (but see below)

Source: GridView+Events.swift, GridView.handleEditorCommand, MainMenu.swift, FeatureAudit/AuditFeature.swift (⌘T).

# Different from Excel for Mac

Action Excel for Mac ORIX Sheet
Insert today's date ⌃; ⌘; — types the date as yyyy-mm-dd into the cell editor (the entry is committed with Return)
Insert the current time ⌘; no shortcut (⌘; is the date)
Show formulas ⌃` **⌘**. macOS assigns ⌘ to "Move focus to next window" by default; which one takes effect was not tested
Fill down / right with Control ⌃D / ⌃R not bound (⌘D / ⌘R only)
Next / previous sheet ⌃Page Down / ⌃Page Up, ⌥→ / ⌥← ⌥⌘→ / ⌥⌘←
Insert a sheet ⇧F11 no shortcut (Insert ▸ Sheet, or the + button of the sheet tabs)
Rename the sheet no default shortcut ⌥⌘R
Beginning of the row Home Home moves to the first column after the frozen columns
Beginning of the sheet ⌃Home ⌘Home (first cell after the frozen panes); ⌃Home is not bound
Last used cell ⌃End ⌘End; End alone moves to the last used column of the row. There is no "End mode" (End followed by an arrow)
Recalculate F9 or ⌘= recalculates what needs it ⌘= recalculates every formula (markAllDirty); F9, ⇧F9 are not bound. Ordinary recalculation is always automatic; there is no manual calculation mode
Paste Special ⌃⌘V opens a dialog no dialog: ⇧⌘V pastes values, ⌥⌘V pastes formatting; Formulas and Transposed are menu items without shortcuts
Toggle absolute/relative reference while editing ⌘T or F4 not implemented
Redo ⌘Y (and ⇧⌘Z) ⇧⌘Z only
Zoom ⌥⌘= / ⌥⌘− ⌘+ / ⌘− / ⌘0, pinch, ⌘ or ⌃ + scroll wheel
Save As ⇧⌘S ⇧⌘S is Duplicate (macOS autosave document model; there is no Save As)
New from template ⇧⌘P ⇧⌘N; ⇧⌘P is Page Setup…
AutoSum ⇧⌘T toolbar button only
Insert function / Formula Builder ⇧F3 no shortcut (function browser in the inspector)
Replace ⌃H same bar as Find (⌘F)
Delete rows/columns, insert cells ⌘− / ⇧⌘= (⌃− / ⌃⇧=) ⌘− is Zoom Out; rows and columns are inserted and deleted from menus. Inserting or deleting individual cells with a shift is not implemented
Context menu key, F6 pane cycling, F10 menu, key tips various not implemented beyond macOS defaults

Source: GridView+Events.swift (key codes 36/76, 48, 51/117, 53, 115, 119, 116/121, 120, 49 and the performKeyEquivalent table), MainMenu.swift, Welcome.swift.

# Shortcuts that exist only in ORIX Sheet

Shortcut Action Defined in
⌥⌘M Merge or unmerge cells MainMenu.swift
⌥⌘I Show or hide the inspector MainMenu.swift
⌃⌘S Show or hide the navigator MainMenu.swift
⇧⌘E Export the active sheet to PDF MainMenu.swift
⇧⌘P Page Setup MainMenu.swift
⌥⌘K, ⌥⌘1 … ⌥⌘5 Insert chart…; quick column, line, scatter, pie, histogram chart FeatureCharts/ChartsFeature.swift, ChartBuilder.quickKinds
⇧⌘I Import data… (data engine) FeatureData/DataFeature.swift
⌥⌘P Python Studio FeaturePython/PythonFeature.swift
⌥⌘A Audit Workbook FeatureAudit/AuditFeature.swift
⌥⌘N Named Ranges… FeatureAudit/AuditFeature.swift

Source: the files named in the table, read on 2026-11-21.

No key equivalent is used twice in the menu bar:

  • Insert ▸ Sheet has no shortcut, so ⌥⌘N belongs to Data ▸ Named Ranges… only.
  • Feature actions ask for their shortcut when they register. MainMenu.workspaceItems keeps a set of the shortcuts already given: when a second action asks for one that is taken, the first keeps it and the second gets a menu item without a key equivalent. This is the case of ⌥⌘A: Audit Workbook (Analyze menu, built first) keeps it, and the Automation action of the Tools menu, which asks for the same keys in AutomationFeature.register(), has no shortcut.
  • The app-hosted test testMenuBarHasNoDuplicateShortcuts walks the main menu and fails on any duplicate; it passes (docs/reports/app-tests.json).

Other notes: ⌃Space is also macOS's default "select the previous input source" when several input sources are enabled; Delete and Forward Delete both clear the contents of the whole selection (or delete the selected object); typing any printable character starts a "quick" edit in which the arrow keys commit and move.

# 6. What to expect when exchanging files with Excel users

  • Excel → ORIX Sheet: values, formulas, formats, tables, validation, conditional formats, names and print setup arrive. Charts, images, pivot tables and macros are not visible but are not lost as long as the workbook is later exported to .xlsx / .xlsm. Recalculated results can differ from Excel's cached ones where section 3 or formulas.md lists a deviation; the app does not compare the two and does not flag cells whose recalculated value differs from the cached value.
  • ORIX Sheet → Excel: cells, formulas, formats and the modelled sheet features are written. ORIX charts, figures, pivot tables, Python scripts, queries and workflows are not exported; the preflight report says so before the file is written. Formulas using functions Excel does not have will show #NAME? in Excel.
  • Round trip Excel → ORIX → Excel: rich text in cells, theme-colour links, threaded-comment structure, filter criteria, x14 conditional-format extensions, split panes and the items marked ✗ above are lost or flattened; preserved parts (charts, pivots, VBA in .xlsm) come back unchanged and are therefore stale if the cells they depend on were edited.
Files main
Menu

Theme