Is there a way we can compare two csv/xls/xlsx files in a very generic way like from reading a parameter/config file rather doing changes at code level for any two similar file types.
I have two xls files, File1.xls and File2.xls
File1.xls has columns as below
File2.xls has columns as below
the comparison should be defined in config file so the solution remains intact for any two files.
here the comparison should be between
File1.xls -----> File2.xls
apple(col2) --> apple(col7)
sname(col3) --> sname(col2)
orange(col5) --> orange(col1)
so from this config reading of what to compare in these two files, it should compare/validate.
If there is any match from the row of file1 to the items in file2, this should be captured in matching file else captured in differences file.
so next time if any other two files need to be compared all we may have to change is this config file with columns defined for file1 and file2 to compare.
Hope you got an understanding of the solution that I’m thinking of, can someone share your ideas around this as a solution.