Read an excel column and validate the text

Hi, I have an input excel file whith a column just like this:


I want to compare the text contained in the “A” column to the text obtained from the values in the “B” clumn from the Config.xlsx file:

In case the text is not exactly the same, then throw a System exception.
How could I do that comparison?
Thanks!

Hi,

How about the following?

checkKeys = {"ClientName","StaffEmailAddress","FieldToSearch","MinOperator","MaxOperator","MinValue","MaxValue","NumberOfSamples","SupplementalSamples""NameFieldToStratify"}
checkValues = in_Config.Where(Function(kv) checkKeys.Contains(kv.Key)).Select(Function(kv) kv.Value.ToString).ToArray

Read Range without header from the 1st sheet (Let’s say dt)
CheckTrue with the following expression

dt.AsEnumerable.All(Function(r) checkValues.Contains(r(0).ToString))

This checks if each value of columnA in the 1st sheet exists in 2nd sheet columnB.

Regards,