How to copy different columns at a time and paste it in another excel file

how to copy column data with the index and paste it in another excel file.
how to copy multiple column data at a time

@anjani_priya

Read Range dtOriginal

Assign
dtSelectedColumns = dtOriginal.DefaultView.ToTable(False, 0, 2)

Write Range → dtSelectedColumns

where the indexes are mentioned?

dtSelectedColumns = dtOriginal.DefaultView.ToTable(False, “Column1”, “Column2”)

Particular columns should be add in the particular index
how to mention them?

no.The data didn’t copy.

Hi @anjani_priya ,

Do you have the Column Names and Index Mapping ? For Better and faster responses, would ask you to share with us an Example and the Expected output.

task is that salary and name in second sheet should fill in first sheet and salary should be in integr format
how to do it
Book1.xlsx (12.6 KB)

Hi @anjani_priya

Try this

O/P:
Book1 (6).xlsx (12.9 KB)

Hope this helps!!

salary should be in integer format

Hi @anjani_priya

Try using vlookup formula in writecell activity and autofill range activity.

Hope it helps!!

yes but how to change salary column in int format?

@anjani_priya

Then try this

Book1 (6).xlsx (13 KB)

@anjani_priya
Use format cells activity and change it to number with 0 decimals

Hope it helps!!

no I have to change the whole column data at a time

@anjani_priya

Try this it is changing data type as integer


this is my code where should i put that?

excel files are different
copy paste works only on same excel file

@anjani_priya

In that case you can use Use Excel File activity within the Use Excel File activity then do Copy/Paste Range

input is one excel file and output is another excel file
copy paste works on single file