Work book activity doubt

how to copy only some particular columns. for example i have to copy column A1,B1 and D1 to another sheet. How to do it?

regards vishal

1 Like

column or row A1?

Thanks and Regards,

oh sorry. corrected it… the columns

Read the excel and using Filter Datatable remove the unwanted column and write the Datatable in another sheet.

Suresh J (16.5 KB)

Please refer the workflow
i have stored the data in one datatabel and used filter datatable for moving the data


1 Like

but it dosent help, i cant give only the column name to filter it. It is having some conditons

yah thats possible
–use a excel application scope and pass the file path as input
–use read range activity and get the output with a variable of type datatable named outdt
–use a assign activity like this
finaldt = outdt.DefaultView.ToTable(False,“column A”,“columnB”,“columnD”)

Where finaldt is a variable of type datatable which will be having the columns A,B and D alone in it
–now use a write range activity and pass the variable finaldt as input and mention the sheetname and make sure that ADD HEADERS property is enabled

hope this would help you buddy

1 Like

This helped. Thank you. :slight_smile:
Column name enough for the filter datatable.
Could you elaborate on the condition?

Suresh J

copied.xlsx (23.3 KB) filter this to show only name and workdoneinhours

Filter datatable will not work with duplicate column name,
instead we can rename it with other name using write cell.

Suresh J

remove one “workdone in hour” column

1 Like

got it. ty

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