ALL BUSINESS DATA ANALYSIS ENGLISH ARTICLES MICROSOFT EXCEL TIPS PYTHON

Comparison of data values between two excel files and creation of a new excel and csv file with PYTHON

Let’s assume that you have 2 excel files :

product_data_excel.xlsx (99 rows x 5 columns, A2: E100)

product_data_excel_2.xlsx (107 rows x 5 columns, A2:E108)

The 5 columns of the two excel files are : product_id, product_description, quantity, regular_price and category.product_data_excel.xlsx

You have changed quantity and price values for existing product_ids : “A0001” and “A0003” (column : “product_id”) and you have added 8 new products in excel file : product_data_excel_2.xlsx.

product_data_excel_2.xlsx

Now you want to compare product_data_excel.xlsx and product_data_excel_2.xlsx and create a new excel file  : product_data_excel_changed_and_new_records.xlsx and csv file : product_data_excel_changed_and_new_data.csv with the 2 existing products you have changed and the 8 new ones you have added.

product_data_excel_changed_and_new_records.xlsx

Download

product_data_excel.xlsx,

product_data_excel_2.xlsx,

product_data_excel_changed_and_new_records.xlsx, product_data_excel_changed_and_new_records.csv

Click comparing_data_values_between_2_excel_files to see the code (html format) . . .

 

Views: 6

Comments are closed.

Pin It