I ended up using the following solution provided by @aksh1yadav , where the attached work flow was designed to dynamically give the column name. So I assigned a column counter variable and input it into the the work flow done by @aksh1yadav. The output of the work flow was then given to the write range activity. So what happens is the robot reads the file, counts the number of columns in the excel, count+1 gives empty column numeric, that goes into write range activity range.
Thanks again for the response, appreciate.
@aksh1yadav if you do see this post, would love to understand the logic behind the workflow you gave. Trying to figure out how it works Excel_Column_Name_mapping.xaml (6.1 KB)