How to lookup for a value in a data table without knowing its size

Hi community,

I have to check if a .csv has the character: "

If that character exists in the file, then I need to discard it and inform you about it.

Actually, I’m reading the.csv and getting a dt with its information. The problem is that I don’t know what size the datatable will be.

Any ideas?

Hi,

Can you try the following expression?

dt.AsEnumerable.Any(Function(r) r.ItemArray.Any(Function(o) o.ToString.Contains("""")))

Regards,

1 Like

Thank you! It worked with a little change.

dt.AsEnumerable.Any(Function(r) r.ItemArray.Any(Function(o) o.ToString.Contains(CHR(34))))
1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.