I have been working to compare two workbooks inside of the same excel file. I have been stuck and cannot seem to fix my problem. My application is enclosed in this ticket, if someone could help with a correction I would greatly appreciate it.
I am looking to confirm that 5 values match in both workbooks, if so I would like “Pass” to be written at the end of the row in excel (Column S). If the records do not match I would like “Fail” to be written at the end of the row.
Problems
The system will only write the first row and is writing fail although it should be pass
I can get the application to run when searching for just one value but when I add the other 4 I receive an error “The source contains no data” I assume this means that there is blank data in one of the cells?
If someone could help me with this I would greatly appreciate
Thank you for sharing your data.
However, it fails in your workflow because of mismatch number of columns. Can you show us which column should be compared in dummy data?
d1(“C”).ToString.Trim.Equals(d2(“Nm”).ToString.Trim) And d1(“VC”).ToString.Trim.Equals(d2(“SC”).ToString.Trim) And d1(“UP”).ToString.Trim.Equals(d2(“a21”).ToString.Trim) And d1(“TP”).ToString.Trim.Equals(d2(“aa”).ToString.Trim)
I ran the application and after deleting the data in column S I see that Pass and Fail are written. I thought they were missing but I see the values overwrite my Results file. I will have to see about implementing your fix into my production application.
I accidentally overwrote my only results file with Dummy data. I am now getting an error that “c” on d1 does not exist in my data table although it is on the spreadsheet. Do you know why this might be occurring? I am probably overlooking something very minor here…
It was a typo on my side, I think I spent too much time at the keyboard yesterday. Thank you for your help! I think this solution will help many others!