Copy specific columns from excel and paste into another excel file

I need to copy some specific columns from one file into excel and move to another file.
if possible could someone send an example of how it does?
Thank you very much in advance

Hi @Beatriz,

Instead of copy you can use read cell activity to get the data from one Excel and use write cell activity to write the value into cell.

@Beatriz

  1. Read source excel file and assign output to datatable.
  2. Use below statement in right side of assign statement, and give as many as columns names u wanted.

dt.DefaultView.Table(False,“ColumnName1”,“CoumnName2”)

and on left on hand side give new Datatable variable

  1. Use write range activity write the datatable to destination excel, Give correct starting range of excel.

Hello, I tried to do the way you said it, but it is appearing a mistake that the column does not belong to the table, could you help me?
Thank you very much in advance

I would need the columns

(Data Fechamento,Nome Cliente,Matrícula Criador,Organização Criador,Motivo 2,Produto)

the file is not in csv because it converted to do uploud

123.xaml (11.1 KB)
output.csv.xlsx (13.6 KB)

@Beatriz Maybe u should give space in end like below.

"Data Fechamento "

try it once

HI @Beatriz,
Refer this xaml file
123.xaml (11.3 KB)

Please check the “Data Fechamento” Column Name is present or not in the csv file

unfortunately it is not working yet

unfortunately it is not working yet

Data Fechamento is present on the file

the columns in the file are all together, is that why you’re not recognizing?

@Beatriz it may be one of the reason. Can u share the input file, if it is not confidential?

HI @Beatriz,
I think you need to change the Read CSV Delimiter Properties, your input its not look like comma suppurated

Follow the file, thank you very much for the attention, if you could help me I would be very grateful

the original csv file is separated right into columns as print shows, so it becomes “messy” when converting to xlsx.
but in the workflow I was using the original file in csv (with the right columns) and even then I would report that column did not exist

I’ve converted the file to xml to be able to send1.xlsx (11.7 KB)

@Beatriz Your 1.xlsx excel contains duplicate columns dude

@Manjuts90, Probably u have missed ‘To’. It has to
dt.DefaultView.ToTable(False,“ColumnName1”,“CoumnName2”)

2 Likes