Compare data from two excel and write the differences in new excel | Selenium Training|Java|WebDriver|TestNG|Frameworks|Videos

Selenium Training Forum

Compare data from two excel and write the differences in new excel

C
Chandrasekhara Reddy Post on 31/10/2018

Hi, as per my project requirement i need to compare two excel files. my data would be some times there will be a difference in row count. if there is a difference in row count then we need to skip that row while validate data and skipped row should be added in a new file or highlight it. My Excel file 1will be the source. i need to compare Excel file 2 with excel file 1.

does any one has the solution for this?

A

Instructor

Ashish Thakur Reply on 07/11/2018

You simply need to use xlsReader file which is explained in moduel 7
Create 2 objects of xls reader, each pointing to a file and compare in a loop
Create a third object of the destination file
If data doesnt match then write with third object