How to compare 2 CSV files with MS Access



Compare two CSV files for differences in Access

It may happen to end with two different tables, in which you just want to know what are the exact differences, especially when you manage a lot of data.

I propose you a simple way to quickly get differences between two tables – the only difficult part is to get them in the right format !

The first step is to get two Excel workbook, for example an old one (Fig 1) and a new one (Fig 2).

Check that both tables have the same columns in the same order with the same naming, and that the first one contains a unique identifier – meaning there is no two times the same value in this column within the same file, and that same lines of both files have the same value in this column.

Also, you may want to order your tables, as the program will not do it – you can use standard Excel order function to do so.

Then, you should convert your Excel tables in CSV. Open then, and choose “File” => “Save As…” => “CSV (Comma delimited)(*.csv)”, for the first file (Fig 3), and then again for the second file (Fig 4).

You can now download the Access database I propose you[1] and save it in the same folder as your two CSV files.

Open it and select your language in the Macros menu (Fig 5), and the program will ask you to provide the name of the first file (Fig 6) to compare to the second one (Fig 7).

Pay attention to give the full name of the csv file, and to have them located in the same folder, or you will get an error (Fig 11).

Comparing two CSV files

As a result, you will get up to 3 files, depending on type of errors found :

- a first file with new lines (Fig 8) found in second file but not in first file, with amount of new lines in file name,

- a second file with deleted lines (Fig 9) not found in second file but found in first file, with amount of deleted lines in file name,

- a third file with cell changes (Fig 10) from an old to a new value, with amount of changes in file name.

Example files were built using Random Word Generator (Plus)[2].

How to compare two tables in MSAccess

To compare two tables in MSAccess and see the differences cell by cell, export them as CSV files, and use our tool to compare CSV tables in MSAccess.

The result will be the comparison of the two tables in ACCESS tool. Line by line, column by column, and cell by cell the differences between the two ACCESS tables will be shown in the result file.

Comparing Data Differences Between Two Identical Access Tables

Complete 2019 Excel for Beginners in video




Similar articles

MSExcel: How to find the position of a character in a string?

MSExcel: How to find the position of a character in a string?

Finding the position of a character in a string can be a very simple operation in MSExcel, by using the corresponding built-in function “FIND”.


Comments (17)

 2018-08-19  Sherry Moody
Gracias, muy informativo
 2018-08-19  Caleb Evans
Me encanta leer tu contenido, sigue publicando
 2018-08-19  Brandon Watts
Grazie, molto istruttivo
 2018-08-19  Roderick Franklin
Eu não sabia sobre esses detalhes, por favor, faça mais
 2018-08-19  Bobbie Estrada
Obrigado que foi útil
 2018-08-19  Randy Russell
Yani böyle yapıyoruz, bilmek güzel
 2018-08-19  Rufus Anderson
เรื่องดีขอขอบคุณสำหรับการแบ่งปัน
 2018-08-19  Edgar Brown
Nu știam despre aceste detalii, vă rog să faceți mai mult
 2018-08-19  Irene Moore
I’ll try it right now, thanks for sharing
 2018-08-19  Jane Cooper
Uau, é realmente assim tão simples, vai tentar agora
 2018-08-19  Phillip Sanchez
Eu vou tentar agora, obrigado por compartilhar
 2018-08-19  Goosearma
素晴らしいサイトです
 2018-08-19  FighterGrand
वास्तव में जो मैं खोज रहा था, बिल्कुल सही
 2018-08-19  xangarandaina6
정확히 내가 뭘 찾고 있었는지, 완벽 했어.
 2018-08-19  ynternaat0
Hallo, ik zag je artikel en het hielp me om mijn probleem op te lossen, heel erg bedankt
 2018-08-19  modderl
素晴らしい情報、共有のおかげで
 2018-08-19  abastanzaP
וואו, זה באמת כל כך פשוט, ינסו את זה עכשיו

Leave a comment