Check if excel has particular value, excel has no columnName in it

still it returns false :smiling_face_with_tear: :smiling_face_with_tear:

1 Like

My question

I have a sheet, it may or may not have data
if it has data → [MM-dd-yyyy] format

now i need to compare if this [MM-dd-yyyy] is already present in that sheet

Let’s try this once as this should handle empty or null cells as well.

dt_Schedule.AsEnumerable().Any(Function(r) Not IsDBNull(r(0)) AndAlso Not String.IsNullOrWhiteSpace(r(0).ToString()) AndAlso DateTime.ParseExact(r(0).ToString(), "MM-dd-yyyy", System.Globalization.CultureInfo.InvariantCulture).Date = DateTime.Now.AddDays(-1).Date)

A list of variables with their respective data types and values is shown, including a Boolean type highlighted in yellow with the value "false." (Captioned by AI)
still throwing false