Leo_Hope
(Leo Hope)
June 27, 2024, 7:02pm
1
Hi, I am trying to retrieve a specific cell content from a Datatable . Let’s say I have data as in below format:
|col 1|col 2|col 3|col 4|
|1|a|b|PDF|
|2|c|PDF|d|
I need to check- if the cell content is PDF and return boolean accordingly .And this cell can be in any row/column.
can you try this
dt.AsEnumerable.Any(Function (r) r.ItemArray.Any(Function (i) i.ToString.ToLower.trim.Contains("pdf")))
Leo_Hope
(Leo Hope)
June 27, 2024, 7:14pm
4
@muktadir where do i use this query
Use this query in an assign activity
blnPDFFound = dt.AsEnumerable.Any(Function (r) r.ItemArray.Any(Function (i) i.ToString.ToLower.trim.Contains("pdf")))
blnPDFFound is a boolean var
Hi @Leo_Hope
Read range workbook
For Each Row in dt
For Each column in dt.Columns
If row(column).ToString.Contains(“PDF”) Then
// Set a boolean variable to true or perform any other action
End If
Next
Next
Hope it helps!!
Leo_Hope
(Leo Hope)
June 27, 2024, 7:25pm
8
1 Like
system
(system)
Closed
June 30, 2024, 7:26pm
9
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.