Skip to main content

Module diff

Module diff 

Source
Expand description

frazaro diff <old.xlsx> <new.xlsx> (PORT.8, slice 8c): two workbooks’ files read through the one reader and compared, printed as the changed relation of REFLECT (docs/SINGULARITY.md, Stage 0.3; the roadmap’s AXM.11, whose changed(addr, old, new) from a saved copy or another file this is, with no host on the machine).

Sheets are matched by name without case, as Excel names them; a sheet in one file alone is reported and never matched, so a renamed sheet is a removal and an addition, as AXM.11 says, and its cells are not listed. Names and Tables, which share one namespace in a workbook, are matched by name without case; the cells of matched sheets by address. Each other difference is one row, (changed "<key>" <old> <new>), the key in the spelling the refers relation uses for its second field (Model!B3; Rate or Model!Local for a name as its name row spells it; Sales for a Table), so that cause (AXM.11’s three rules) joins changed to refers with no parser: a repointed name is a changed precedent of every formula that refers to it. A side is blank where the file holds nothing, a value as a cell row prints it, (formula "=…") for a formula with no cached value, or (formula "=…" <value>) with one; a name’s side is its refers-to text, a Table’s its sheet and range as Data!A1:B5. A cell is changed when its formula’s text or its value differs; numbers compare as numbers (800 and 800.0 are one value, since a writer other than Excel spells a float with its point), every other value by kind and text.

The fixed order, which makes the text a golden: the sheets in one file alone, removed (the old file’s tab order) then added (the new file’s), then the matched sheets whose state changed, in the new file’s tab order; then the names and Tables sorted by key without case; then sheet by sheet in the new file’s tab order, cell by cell in document order. The reader streams one pair of sheets at a time: both sheets’ cells are held while they are compared and dropped before the next pair, so what is held is two sheets, never two workbooks.

Structs§

DiffStats
What the comparison counted.
Discard
A sink that keeps nothing, for --counts.
Lines
A sink that holds the lines as one text, each ending in a line feed.

Enums§

Change
One row of the difference between two workbooks.

Traits§

ChangeSink
Where the rows go as the comparison finds them.

Functions§

diff
The difference between two opened workbooks, in either format, to the sink in the fixed order; what was counted comes back. A refusal from either file’s walk ends the comparison, the rows before it standing.
diff_text
The whole difference as text, one row a line in the fixed order: the API’s surface, the tests’ and a door’s that holds the text. Each label is what a refusal calls its file.
line
One row as its line, without the line break.