Expand description
§sheets-diff
Structured diff engine for Microsoft Excel .xlsx workbooks.
§Quick start
use sheets_diff::compare_paths;
let diff = compare_paths("old.xlsx", "new.xlsx")?;
println!("changed cells: {}", diff.summary.cells_changed);§Input sources
| Function | When to use |
|---|---|
compare_paths | Simplest; caller provides file paths |
compare_bytes | You already have the bytes (e.g. from a cache or repo) |
compare_readers | You have open Read + Seek handles |
compare_*_with_options variants | Any of the above plus DiffOptions |
See DiffOptions / DiffOptionsBuilder for all configuration knobs.
Re-exports§
pub use model::AlignmentSummary;pub use model::CellChangeKind;pub use model::CellDateTime;pub use model::CellDiff;pub use model::CellDisplay;pub use model::CellDuration;pub use model::CellError;pub use model::CellNumberFormat;pub use model::CellSnapshot;pub use model::CellValue;pub use model::DateTimeKind;pub use model::Diagnostic;pub use model::DiagnosticKind;pub use model::DiagnosticLocation;pub use model::DiagnosticSummary;pub use model::DiffMetrics;pub use model::DiffStage;pub use model::DiffSummary;pub use model::DisplaySource;pub use model::FormatChange;pub use model::FormulaChange;pub use model::FormulaText;pub use model::MatchConfidence;pub use model::Severity;pub use model::SheetChange;pub use model::SheetDiff;pub use model::SheetMatchReason;pub use model::SheetRef;pub use model::SheetSummary;pub use model::Side;pub use model::SourceDescription;pub use model::SourceKind;pub use model::ValueChange;pub use model::ValueDifferenceKind;pub use model::WorkbookChange;pub use model::WorkbookDiff;pub use model::WorkbookObjectChange;pub use model::WorkbookSideInfo;pub use address::CellAddress;pub use address::ComparedRange;pub use address::MAX_COL;pub use address::MAX_COL_LABEL;pub use address::MAX_ROW;pub use options::AlignmentMode;pub use options::Cancellation;pub use options::ComparisonOptions;pub use options::DateComparePolicy;pub use options::DiagnosticOptions;pub use options::DiffEvent;pub use options::DiffOptions;pub use options::DiffOptionsBuilder;pub use options::ExecutionMode;pub use options::ExecutionOptions;pub use options::FormatCompareMode;pub use options::FormulaCompareMode;pub use options::Limits;pub use options::MatchingOptions;pub use options::NumberComparePolicy;pub use options::NumericTypePolicy;pub use options::OutputOptions;pub use options::ProgressSink;pub use options::SheetMatchingMode;pub use options::TypeMismatchPolicy;pub use options::ValueCompareOptions;
Modules§
- address
- Cell addressing: A1 label encoding, 1-based coordinates, Excel bounds.
- model
- Typed result model (
WorkbookDiff,SheetDiff,CellDiff,CellValue, …). Public result data model. - options
- Comparison options and builder (
DiffOptions,DiffOptionsBuilder, …). Comparison options, builder, and related policy enums (RFC-006, RFC-033 §11). - output
- Output formatters (text summary, unified diff). Output formatters and view adapters (RFC-013, RFC-029).
Enums§
- Limit
Kind - Which resource limit was exceeded.
- Object
Compare Mode - Controls how the presence of non-cell objects is handled.
- Open
Error Kind - Why a workbook could not be opened.
- Read
Error Kind - Why a sheet could not be read.
- Sheets
Diff Error - Fatal error returned by every v2 entry point.
Functions§
- compare_
bytes - Compare two workbooks given byte slices.
- compare_
bytes_ with_ options - Compare two workbooks given byte slices, with explicit options.
- compare_
paths - Compare two workbooks given their filesystem paths.
- compare_
paths_ with_ options - Compare two workbooks given their filesystem paths, with explicit options.
- compare_
readers - Compare two workbooks given
Read + Seekreaders. - compare_
readers_ with_ options - Compare two workbooks given
Read + Seekreaders, with explicit options.