← Practical guides

Merge two Korean CSVs and keep product codes intact in Excel

Two systems export inventory in different encodings: CP949 and UTF-8. Combine their records, keep the newer row for each repeated product code, and open the result in Excel with product codes stored as text and stock counts stored as numbers.

Example files

Older inventory / CP949

Three rows. Stock is 10 for 00123 and 8 for the 20-digit code.

Download / 93 B

Newer inventory / UTF-8

Three rows. Updates those stock counts to 14 and 9 and adds code 00009.

Download / 109 B

Reference workbook / XLSX

Four retained rows. Codes and names are text. Stock counts are numbers.

Download / 3,309 B

Follow the steps

  1. Set the encoding for each file

    Download both CSVs and select them together in the workspace. Check that file 01 comes before file 02. Set file 01 to CP949, file 02 to UTF-8, and both delimiters to comma. Load and combine the files.

    Open tool →
  2. Review duplicates by product code

    Choose 상품코드 as the duplicate key and compare the source files and stock counts in each group. If file 02 is listed last, choose Keep last occurrence. If the order is reversed, choose one row per group and keep the row from file 02.

  3. Save the product codes as text in XLSX

    Keep 상품코드 and 상품명 checked in the text columns and uncheck only 재고. Download the XLSX and open it in Excel. Confirm that 00123 and the 20-digit code are intact and that the stock column sums to 31.

Measured results

Four rows remain after removing two duplicates from six input rows. Stock for 00123 is 14 and stock for the 20-digit code is 9. Codes 00007 and 00009 appear once each.

상품코드상품명재고
00007종이 클립5
00123한글 노트14
00009색연필3
12345678901234567890펜 세트9

Understand the result

How the retained row is chosen

Keep last occurrence uses the listed file order and the row order within each file. Use manual selection to choose a different source in an individual group.

Store codes as text and quantities as numbers

XLSX records cell types. Text preserves the leading zeros and all digits of a product code. Numeric stock cells can be summed directly in Excel.

When the result is different

Why is the Korean text garbled or the file rejected?
Check the input encoding for each source. File 01 uses CP949 and file 02 uses UTF-8. If garbled text was already saved into a file, retrieve the original export.
What if the column names or order differ?
Prepare copies with matching headers and column order. Use CSV Compare if you only need to see how the records changed.

Test conditions and sources

The site’s merge and XLSX export code processed two synthetic CSVs. Microsoft Excel opened the result and confirmed the text codes, numeric stock cells, and stock total of 31.

Node.js 24.21.0 / Windows /

Microsoft Excel 16.0 / Build 19127 / Windows (64-bit) NT 10.00

Download measurements and file checksums (JSON)