How to find Empty Columns of datatable


I want to check a single row of datatable having empty fields.
Suppose In 1st row want to check to which columns are empty by name.
How can I Do that.


Hi @amarjeet_kumar,

In my example, when a specific column header doesn’t contain a name, it basically comes with ‘Column’ and a number in its name, for example, in my excel file the empty column header was renamed to ‘Column1’ in the datatable. Kindly check the attached example. (7.8 KB)


I do not believe that the previous answer is correct.

In my example I have looped through each of the data columns in the table using DataColumn as the object. You are then able to reference the column name. You will see that any blank column headers are automatically entitled “Column1” and would increment accordingly e.g. Column2, Column3 - you could then use these columns to rename or delete as required.

Here is a link to the online solution and the xaml file and test.csv document are attached.

Checking Empty (1.8 KB)