Worked example
Find quantity changes and added/removed catalog items
Compare two fictional product catalogs using 상품코드 as the identifier. The new catalog reorders rows and columns, so a line comparison could treat reordering as a change. Use Compare example files or download the two inputs above.
- Select catalog-before-cp949.csv as the old file and catalog-after-utf8.csv as the new file. Set the old encoding to CP949, the new encoding to UTF-8 and both delimiters to comma. Read both files.
- Choose 상품코드 as the unique key. Leave whitespace ignoring and formula prefixing off, then compare by key. Reordering rows and columns does not affect matching.
- Check that code 00042 changes quantity from 10 to 12. Code 00044 is removed, 00045 is added and 00043 is unchanged. Download the report and compare it with catalog-changes.csv.
What to check in the result
Expect 1 added row, 1 removed row, 1 changed row, 1 unchanged row and 1 changed cell. The report has 5 entries: one changed cell, two non-key fields for the removed row and two for the added row. The status column uses changed/removed/added; before_line and after_line identify physical lines in each original. Originals stay untouched.
Troubleshooting
- Why is a duplicate key rejected?
- The key must uniquely identify each row within each file. Choose another suitable column or resolve duplicate values in the source and read both files again. Empty and whitespace-only keys are also rejected. Rows are never picked arbitrarily or merged automatically.
- Why do column names or row widths fail?
- Column order may differ, but both files need the same set of names, including case and whitespace. Check blank names, duplicate names and uneven rows in the source application. The CSV checker can also help inspect delimiters and encodings.
- Can key whitespace be ignored?
- Whitespace ignoring applies only to non-key values. Keys match exactly: 00042 differs from 42, and whitespace differences produce separate removed and added rows. Values considered equal after ignoring surrounding whitespace are omitted from changes; the source is not edited.
- Why does the report add apostrophes?
- The formula-prefix option adds an apostrophe before formula-like report keys and values. Review the preview and prefix count. Disable the option and compare again for a report containing the original values.