A web-based Excel file comparison tool that helps you identify differences between two Excel files quickly and easily. Runs completely in your browser with no server uploads required.
| Upload Interface | Sheet Selection | Unified Diff View |
|---|---|---|
![]() |
![]() |
![]() |
- π Drag & Drop Support - Simply drag and drop Excel files to compare
- π Unified Table View - View differences in a single unified table with old/new row indices
- π― Smart Column Matching - Intelligently matches columns by header content, not position
- π Cell-Level Diff - Highlights individual cell changes with old β new value display
- π Column Reordering Handling - Correctly matches columns even when reordered (won't falsely report as added/deleted)
- π― Change Navigation - Jump between changes with Previous/Next buttons or keyboard shortcuts (P/N)
- π±οΈ Click-to-Navigate - Click any changed cell to jump to that change
- π Visual Change Counter - Track your position through changes (e.g., "5 / 23")
- π‘ Visual Indicators - Color-coded cells for easy identification of changes
- π 100% Local - All processing happens in your browser, no data leaves your device
- π No Server Required - Runs entirely client-side
- Unified Table View: Replaced side-by-side comparison with a single unified table
- Old/New Row Indices: Each row shows both its old (File A) and new (File B) row numbers
- Smart Column Matching: Columns are matched by header content, not position
- Handles column reordering correctly
- Detects truly added/deleted columns
- Preserves column relationships even when columns are moved
- Enhanced Cell Display: Modified cells show "old value β new value" inline
- Click-to-Navigate: Click any changed cell to jump to that change in the navigation sequence
- Improved Change Detection: More accurate detection of column additions/deletions
- Removed synchronized scrolling (replaced with unified table)
- Removed side-by-side sheet view (replaced with single table view)
- Removed sheet rename detection (simplified to focus on content comparison)
- Changed sheet selection workflow (now manual selection from dropdowns)
.xlsx- Excel 2007+ files.xls- Excel 97-2003 files
File Size Limit: 50MB per file
No installation required! Just a modern web browser:
- Chrome (recommended)
- Firefox
- Safari
- Edge
- Clone the repository:
git clone https://github.com/HackettLai/excel-differ.git
cd excel-differ- Open
index.htmlin your web browser:
# On macOS
open index.html
# On Linux
xdg-open index.html
# On Windows
start index.htmlThat's it! No build process or dependencies to install.
-
Upload Files
- Click "Select File" or drag & drop your Excel files into the upload areas
- File A: Original/older version
- File B: New/updated version
-
Start Comparison
- Click the "Start Comparing" button
- Wait for files to be parsed and compared
-
Select Sheets to Compare
- If sheets with matching names are found, they'll be auto-selected
- Otherwise, manually select sheets from the dropdowns
- Click "Compare" to view differences
-
Review Differences
- View all changes in a unified table
- See old/new row indices for each row
- Modified cells show "old value β new value"
- Added columns marked with green header (+B)
- Deleted columns marked with red header (βD)
-
Navigate Changes
- Click "Previous" or "Next" buttons to jump between changes
- Use keyboard shortcuts:
Pfor previous,Nfor next - Click directly on any changed cell to navigate to it
- Track your position with the change counter (e.g., "5 / 23")
- Row 1: Column letters with indicators
- Normal columns:
A,B,C - Added columns:
+B(green background) - Deleted columns:
βD(red background)
- Normal columns:
- Row 2: Header content
- Shows actual header text from Excel
(Blank Column)for columns without headers
- Old Column: Row number in File A (or
-if row was added) - New Column: Row number in File B (or
-if row was deleted)
- π’ Green Background - Cell in added column or added row
- π΄ Red Background - Cell in deleted column or deleted row
- π‘ Yellow Background - Cell value was modified (shows old β new)
- βͺ White Background - Unchanged cell
- Modified cells:
old value β new value - Empty cells: Shown as
Blankin italic gray text - Normal cells: Display current value
excel-differ/
βββ index.html # Main HTML file
βββ styles.css # Styling and layout
βββ js/
β βββ main.js # Application entry point and controller
β βββ fileHandler.js # File upload, drag-and-drop, validation
β βββ excelParser.js # Excel parsing using SheetJS
β βββ diffEngine.js # Core comparison algorithm
β βββ diffViewer.js # Unified table renderer and navigation
β βββ copyright.js # Copyright year management
βββ README.md # This file
- Pure JavaScript (ES6+) - No frameworks, vanilla JS with modules
- SheetJS (xlsx) - Excel file parsing
- HTML5 - Modern web standards
- CSS3 - Styling, animations, and responsive design
- File API - Browser-native file handling
- Keyboard API - Keyboard shortcut support
| Browser | Version | Status |
|---|---|---|
| Chrome | 90+ | β Fully Supported |
| Firefox | 88+ | β Fully Supported |
| Safari | 14+ | β Fully Supported |
| Edge | 90+ | β Fully Supported |
The tool matches columns by header content, not position:
- Header-Based Matching: Columns with identical header text are matched
- Example: If "Email Address" moves from column G to H, it's still matched correctly
- Reordering Tolerance: Column position changes don't trigger false positives
- Cells are compared based on what column they logically belong to
- Reordered columns are NOT marked as added/deleted
- True Add/Delete Detection: Only reports genuine column additions/deletions
- Added column: Header exists in File B but not in File A
- Deleted column: Header exists in File A but not in File B
Quickly navigate through all cell-level changes:
- Previous/Next Buttons - Navigate sequentially through changes
- Keyboard Shortcuts - Press
Pfor previous,Nfor next- Only active when not typing in input fields
- Works globally across the page
- Click Navigation - Click any changed cell to jump to that change
- Updates current position in navigation sequence
- Automatically scrolls cell into view
- Change Counter - Shows current position and total changes (e.g., "5 / 23")
- Updates dynamically as you navigate
- Displays
0 / 0when no changes exist
- Visual Highlight - Briefly highlights the target cell when navigating
- 2-second highlight with CSS animation
- Smooth scroll with centering
Rows are matched using column A as the primary key:
- Key-Based Matching: Uses column A value to identify matching rows
- Example: Row with "John Doe" in column A matches across files
- Fallback Keys: For rows without column A values, uses position-based keys
old-{index}for File A rowsnew-{index}for File B rows
- Add/Delete Detection:
- Added row: Key exists in File B but not in File A
- Deleted row: Key exists in File A but not in File B
- Efficient diff algorithm with minimal memory footprint
- Lazy DOM manipulation for large spreadsheets
- Optimized scroll event handling
- Smart cell collection for navigation
Excel Differ uses a multi-step pipeline to detect changes:
- File Parsing - Reads Excel files using SheetJS into JavaScript objects
- Column Matching - Matches columns by header content (not position)
- Row Matching - Matches rows using Column A as unique identifier
- Cell Comparison - Compares matched cells and detects modifications
Key Features:
- β Handles column reordering (matches by header name)
- β Handles row reordering (matches by Column A value)
- β Detects added/deleted columns and rows
- β Highlights modified cells with old β new display
Important Design Decision:
- Row matching relies on Column A values - This enables accurate detection of row reordering, but requires Column A to contain stable unique identifiers
- If Column A values change, rows cannot be matched correctly (see Limitations for details)
π Read detailed technical documentation β
| Key | Action | Description |
|---|---|---|
P |
Previous Change | Jump to previous changed cell |
N |
Next Change | Jump to next changed cell |
Note: Shortcuts are disabled when typing in input/textarea/select elements
Issue: Rows are matched using Column A values only
Impact:
- If Column A values change between files, rows will be incorrectly matched
- All cells in that row may show as modified even if unchanged
Example:
File A: | 1 | peter | 34 |
File B: | 2 | peter | 34 |
Result: Treated as different rows
Shows: "1 β 2" and all cells modified β
Solutions:
- β Use stable IDs in Column A (employee ID, product code, order number)
- β Add an ID column if your data doesn't have one
- β Pre-sort both files by the same key before comparison
β οΈ Avoid using auto-incremented numbers that change between versions
Issue: Maximum 50MB per file
Reason: Browser memory limitations
Solutions:
- Split large files into smaller chunks
- Filter to relevant date ranges before comparison
- Remove unnecessary columns before uploading
- β Cell formatting (colors, fonts, borders)
- β Formulas (only computed values)
- β Charts and images
- β Merged cell information
- β Data validation rules
- β Conditional formatting rules
Alternative: Use Excel's built-in "Compare and Merge Workbooks" for format comparison
- Version Control: Compare different versions of Excel reports
- Data Auditing: Verify data changes in financial spreadsheets
- Quality Assurance: Validate data migrations or transformations
- Collaboration: Review changes made by team members
- Configuration Management: Track changes in Excel-based config files
- Format Comparison: Use Excel's built-in compare for formatting changes
- Large Dataset Analysis: Consider database tools for millions of rows
- Real-Time Collaboration: Use Google Sheets or Excel Online instead
- Formula Debugging: Use Excel's formula auditing tools
Files won't upload
- Check file size (must be under 50MB)
- Ensure file format is .xlsx or .xls
- Try re-saving the file in Excel
Comparison is slow
- Large files may take 10-30 seconds to process
- Close other browser tabs to free up memory
- Try comparing smaller sections of data
Changes not detected
- Ensure both files have matching sheet names
- Check that column headers match exactly
- Verify data types are consistent
Navigation buttons disabled
- No changes detected in selected sheets
- Try selecting different sheets to compare
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Use ES6+ JavaScript with modules
- Follow existing code structure and naming conventions
- Add comprehensive comments for complex logic
- Test with various Excel file formats and sizes
- Ensure browser compatibility
This project is licensed under the MIT License - see the LICENSE file for details.
- SheetJS for the excellent Excel parsing library
- Inspired by diff tools like Beyond Compare, WinMerge, and Git diff
- Built with assistance from Claude AI (Anthropic)
If you encounter issues or have questions:
- π Report a bug
- π‘ Request a feature
β If you find this tool useful, please consider giving it a star on GitHub!
Made with β€οΈ by Hackett.Lai


