Removing empty columns from data table

Hi There,

I am reading a excel file without headers and i want to get the column count.

Read excel adds empty columns at the end and i am getting the wrong column count. So, how to remove the empty columns at the end and get the correct column count?

TIA

Hi @ramya_anbazhagan

please refer the below thread for removing empty columns.

after removing you can get the column count using below syntax.
yourdatatable.columns.count

hope it helps!!!

1 Like

Thanks Baskar, it worked! :slight_smile:

Thats Great!!! please mark it as solution.

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