Skip to main content

Crate sheets_diff

Crate sheets_diff 

Source
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

FunctionWhen to use
compare_pathsSimplest; caller provides file paths
compare_bytesYou already have the bytes (e.g. from a cache or repo)
compare_readersYou have open Read + Seek handles
compare_*_with_options variantsAny 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§

LimitKind
Which resource limit was exceeded.
ObjectCompareMode
Controls how the presence of non-cell objects is handled.
OpenErrorKind
Why a workbook could not be opened.
ReadErrorKind
Why a sheet could not be read.
SheetsDiffError
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 + Seek readers.
compare_readers_with_options
Compare two workbooks given Read + Seek readers, with explicit options.