Replace column headers in transaction file from template file

Hello Friends,

I have a situation where in I have to Replace column headers in transaction file from template file, since I need to upload this data to oracle database via uipath insert.

image

Regards,
Manjesh

HI @manjesh_kumar

You can use read range and write range for this change the range as A1:A4 for reading 4 column headers and uncheck the addHeader property in both, it will replace the data from A1 to A4

Thanks

Hello Prasath,

I did not get you

The yellow shaded part is from transaction file.
The green shaded part is from template file.

I want the columns from template file to replace the columns in transaction file.

Regards,
Manjesh

okay then we have to read the data from template file (read range) and write it in transaction file(write range).

Thanks

@manjesh_kumar,

  1. Read the template file by checking Add Headers property of Read Range activity and store it in dtTemplate variable as datatable,
  2. Create another variable as datatable and assign dtHeader = dtTemplate.clone() which will provide schema or columns of excel
  3. Last take write range and provide dtHeader variable to it and make sure to check Add Headers property of Write Range activity.

Can you please try and let us know?

Hello Pankaj,

I tried this method still the columns are not over written.

Maybe a workflow from you would expose the bug if any in my program.

Regards,
Manjesh

Hello @Pankaj.Patil

Good Day.

An example workflow w.r.t this topic would be great.

Regards,
Manjesh

Hello @manjesh_kumar

Please try this and let me know.

ChangeColumnNames.xaml (7.6 KB)

Hello @kumar.varun2 ,

Thanks for your efforts, I will definitely check it out. I found a solution from from the community from @Yoichi just tweaked a little bit. Appreciate your effort :wink:

Regards,

Manjesh

Can you provide the link of the solution by yoichi.

1 Like

Hello @kumar.varun2 ,

This is the link

Regards,
Manjesh

1 Like

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