Back to guide

Compare Files (Diff)

Compare two CSV or Excel files side by side to understand what changed — with color-coded highlighting for added, removed, and modified rows.

Overview

SheetTool's compare feature lets you load two files and see their differences at a glance. Rows can be matched by index (position) or by a shared key column like an ID, SKU, or email address. Differences are color-coded: green for added rows, red for removed rows, yellow for modified rows, and gray for unchanged rows. You can filter to show only changed rows to focus on what matters. Use compare before replacing production data to catch unexpected changes.

Syntax & Reference

Side-by-side view
Both files are displayed in parallel columns so you can scan across and see differences in context. Matched rows are aligned horizontally.
Match by index
Rows are matched by their position (row 1 to row 1, row 2 to row 2, etc.). Best for files where row order is stable and no rows have been inserted or deleted.
Match by key column
Rows are matched by a shared column value (e.g., Product ID, Order ID, Email). Best for files where rows may have been reordered, added, or removed between versions.
Color coding
Green = added (in new file only), Red = removed (in old file only), Yellow = modified (row exists in both but values differ), Gray = unchanged.
Filter changed rows
Hide unchanged rows to focus on additions, removals, and modifications. Reduces noise when comparing large files with few changes.

Examples

Review inventory changes

Compare yesterday's and today's inventory export, matching by SKU. Yellow rows show stock changes, green rows are new products, red rows are discontinued items.

Audit a price list update

Before sending a new price list downstream, compare it against the previous version by Product ID. Filter to modified rows to review exactly which prices changed.

Find removed customers

Compare two versions of a customer export matched by Customer ID. Red rows indicate customers who were removed between the two exports.

Validate a data migration

After migrating data between systems, export both versions and compare by a unique key. Any differences highlight migration errors to investigate.

Tips & Best Practices

  • Always match by a unique key column when possible. Row order can change between exports, making index-based matching unreliable.
  • Filter to changed rows first, then inspect added, removed, and modified rows separately to stay organized.
  • Use compare alongside the changelog when reviewing a revised version against the original — the changelog shows edits made in SheetTool, while compare shows differences between any two files.
  • For large files, compare a filtered subset first to verify the matching logic works correctly before running the full comparison.

Frequently Asked Questions

What file formats can I compare?+

You can compare any combination of CSV and Excel files. SheetTool loads both files into memory and compares their content regardless of the original format.

How does key-based matching handle duplicates?+

If the key column has duplicate values, the first occurrence in each file is matched. It is best to use a column with unique values (like an ID) for reliable matching.

Can I compare files with different columns?+

Yes. SheetTool matches columns by header name. Columns that exist in only one file are shown and highlighted. Shared columns are compared cell by cell.

Is there a size limit for file comparison?+

Comparison runs entirely in your browser, so the limit depends on your device's memory. Files with tens of thousands of rows compare quickly. For very large files (100k+ rows), performance may vary by device.