Copy column c to column z

Hi all
I want to copypaste columns c to z from one tab to other where the sheet contains multiple columns.can you please help how can be done.

HI @Amulya_A

Checkout this

Change the column in the datatable and then write them in the excel file

Regards
Sudharsan

Thanks for the reply @Sudharsan_Ka but my query is different

Okay i think this is what you want , You need to get only some set of columns and paste them in another sheet or excel file @Amulya_A

If this is what you want you can try this
You can try with Filter datatable

  • Read the whole sheet and store them in the Dt variable
  • Use Filter datatable and use Output columns area and give your column names that you wanted and store the filtered datatable
  • Write the filtered datatable in the new sheet or excel file

Hope this helps!

Regards
Sudharsan

There are so many columns we need to consider. Can’t use filter datatable. Is there anyway that i use range like c:z

Yes ofcource you can do that too @Amulya_A

  • Read range whole sheet and store in the datatable called DT or Anything
  • Read range give the range as “C1:Z”+(Dt.rows.Count+1).ToString and store them in another variable called SColumn_DT
  • Write Range and give the SColumn_DT in the Datatable.

Regards
Sudharsan

Thank you so much @Sudharsan_Ka this worked

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