I’m trying to make an automation to find which rows are empty and what column do they belong. Is that possible ? Imagine , that I have 3 columns in these 3 columns I want to know which are the rows that are empty and return the column name of those rows.
Hi,
Hope the following helps you.
dt.Columns.Cast(Of DataColumn).Where(Function(c) dt.AsEnumerable.Any(Function(r) String.IsNullOrEmpty(r(c).ToString))).Select(Function(c) c.ColumnName).ToArray
Main.xaml (8.2 KB)
Regards,
1 Like
@Yoichi No luck here , that script simply tells me what columns has an empty row and I don’t want that. Imagine , if I take an empty row from a datatable I want to know where does that row belongs. Here’s what I did so far , I read my excel file and I did a for each row then I tried to put the column name hardcoded like this row(“ColumnName”).ToString , it works but I wanted to work dynamically.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.