Compare Two Excel Files and Export Differences with WPS Spreadsheets
Question details
Compare two Excel workbooks with matching columns, identify values that are different, and save only the confirmed differences in a separate file.

- 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.
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.
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.
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.
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.
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.
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.
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.

Match records by ID before exporting differences
Use this method when rows may be in a different order but both files contain a shared identifier, such as an employee ID, order number, or product code.
Use Microsoft Spreadsheet Compare for workbook-level differences
Use this option when you have a supported Microsoft Excel edition and need a report of workbook-level changes such as formulas, hidden rows, worksheets, or used ranges.
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. Open the source workbooks: Open both .xlsx files in WPS Spreadsheets and verify the matching headers or ID column.
- 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. Fill the formula through the dataset: Drag the fill handle down to apply the comparison to every data row.
- 4. Filter changed records: Choose Data > Filter and select the Different or Missing status values.
- 5. Save the difference report: Copy the filtered rows to a new workbook, then select Menu > Save As and choose .xlsx or .csv.

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.




