About Read and Write Excel

Aim : To read headers from one excel and write specific header column data to another excel.
I can read headers from Read row activity and take column data into variable but variable type is IEnumerable I can not use this var to write excel.
According to my knowledge to write excel we need var type datatable.

How do we change var type from Ienumerable to datatable ?
Is their any another way of doing this?
Considering You need to pick up column data by header name

Hey @Tejas_Kabade,

Welcome to the UiPath Community!!!.

Use excel application scope and read range to read the source excel it will return you a datatable as output.Please make sure the add headers property is checked in the property pane.

Use write range activity and place the datatable returned by the read range in the write range activity and dont forget to check add headers property in the properties pane.