Data Import & Export

Compare Two Excel Files and Export Differences with WPS Spreadsheets

Olivia MillerOlivia Miller Nov 12, 2026 870 views

Question details

Compare two Excel workbooks with matching columns, identify values that are different, and save only the confirmed differences in a separate file.

Compare Two Excel Files and Export Only the Differences
Product
Microsoft Excel workbooks and WPS Spreadsheets
Device & OS
not provided
Scenario
The user needs to compare workbook data either by the same cell positions or by a unique ID in matching columns.
Observed behavior
The goal is to create a clean export containing only rows or cells whose values differ between the two files.
Before you start

Place the two workbooks in the same folder and confirm whether rows are aligned in the same order or must be matched by an ID column. Use the same headers and check that values are stored in comparable formats, such as dates as dates and numbers as numbers.

Solution 1Recommended

Compare aligned worksheets cell by cell with a helper formula

Use this method when both worksheets have the same layout and each corresponding row represents the same record.

A helper formula can compare each pair of cells and return a status for matching and changed values. After filling the formula down, filter the status column and copy only the changed records to a new workbook.

1
Open both workbooks

Open both Excel files in WPS Spreadsheets. In the workbook where you want to create the comparison, identify the source sheet and the matching sheet or workbook to compare.

2
Add a comparison status column

On the first worksheet, insert a new column named Status. In the first data row, enter a formula such as =IF(A2='[SecondFile.xlsx]Sheet1'!A2,"Match","Different") and replace the workbook, sheet, and cell references with your actual locations.

3
Compare all required columns

For a row-level result across multiple columns, use a formula such as =IF(AND(A2='[SecondFile.xlsx]Sheet1'!A2,B2='[SecondFile.xlsx]Sheet1'!B2,C2='[SecondFile.xlsx]Sheet1'!C2),"Match","Different"). Drag the fill handle down through all records.

4
Filter the changed records

Select the header row, then choose Data > Filter. Open the filter arrow in the Status column and select Different to display only records with differences.

5
Export the filtered differences

Select the visible filtered rows, copy them, create a new workbook with File > New, and paste the results. Choose Menu > Save As and save the file as .xlsx or .csv.

Compare aligned worksheets cell by cell with a helper formula
Aligned-data limitation: Cell-by-cell formulas compare records by position. If one file has sorted, inserted, or deleted rows, compare records by a unique ID instead.
Compare and export spreadsheet changes

Find and Export Excel File Differences in WPS Spreadsheets

WPS Spreadsheets lets you compare workbook values with formulas, filter records marked as different, and save the filtered results as a separate Excel or CSV file. Use cell references for aligned sheets or lookup formulas when records must be matched by an ID.

  1. 1. Open the source workbooks: Open both .xlsx files in WPS Spreadsheets and verify the matching headers or ID column.
  2. 2. Create a difference check: Insert a Status column and enter an IF comparison formula, or use a lookup formula to retrieve values by ID.
  3. 3. Fill the formula through the dataset: Drag the fill handle down to apply the comparison to every data row.
  4. 4. Filter changed records: Choose Data > Filter and select the Different or Missing status values.
  5. 5. Save the difference report: Copy the filtered rows to a new workbook, then select Menu > Save As and choose .xlsx or .csv.
Compare aligned worksheet values with IF and AND formulas.Match reordered records by an ID with lookup formulas.Filter only changed or missing records before export.Open and save Microsoft Excel .xlsx files with format compatibility.
microsoft office alternative - wps office

Frequently Asked Questions

Can I compare two Excel files when the rows are in a different order?

Yes. Use a shared unique ID, such as an order number, and retrieve values from the second workbook with a lookup formula such as VLOOKUP. Compare the lookup result with the original value instead of comparing matching row numbers.

How do I export only different rows from a worksheet?

Add a Status column with a formula that returns Different, then select Data > Filter and filter that column for Different. Copy the visible rows to a new workbook and use Menu > Save As.

What formula compares multiple columns in two aligned workbooks?

Use AND inside IF, for example: =IF(AND(A2='[SecondFile.xlsx]Sheet1'!A2,B2='[SecondFile.xlsx]Sheet1'!B2),"Match","Different"). Add additional comparisons inside AND for each column you need to check.

Can a formula identify records missing from the second Excel file?

Yes. Wrap a lookup comparison in IFERROR, such as =IFERROR(IF(C2=D2,"Match","Different"),"Missing in second file"). The error result indicates that the ID was not found in the second workbook.

Does Spreadsheet Compare handle formatting, charts, and macros?

Microsoft Spreadsheet Compare can report several workbook-level changes, but its support and results vary by file content and Office edition. For exporting changed data records, formula-based or ID-based comparisons provide a clearer, controllable result.