How to get number of filled rows for each column

Dear Developers, i have question of how to get the number of filled rows for each column without hardcording the column name in a datatable? like in the example below. the result should be 3,2 and 1. the reason is i want to get the column with the highest number and delete the rest of the column. your help is very much appreciated, Thank You.
image

@Yusuf_Rahmaniac What if there are two Columns with the same number of filled rows?

thank you for response sir. then two columns should remain at the end if it has same number of filled rows.

@Yusuf_Rahmaniac Can you Check this workflow :
GetMaxFilledRowsColumn.zip (7.9 KB)

The Output will be the Column Names which contain the most number of filled rows.
It is Stored in variable MaxFilledRowsColumnName.

The Excel File has two Columns with the same number of Filled rows, Hence it will output 2 Column Names.

Hope this is what you wanted

1 Like

wow its works perfectly. thank you for your help sir!!

1 Like

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