I am trying to copy entire text from an excel file and paste it to another. I am using ReadRange from excelsheet 1 and WriteRange to excelsheet2.
Since I have some duplicate columns as a part of the excelsheets, i am getting the following error.

MasterDataPrep has thrown an exception

Message: A column named ‘ABC’ already belongs to this DataTable.

Source: Read range

Exception Type: DuplicateNameException

I have charts inside the excelsheet2 because of which I cannot use Excel Application Scope. Please suggest the solution for the DuplicateNameException error message.

1 Like

Hi @nesachdeva,

While reading don’t include header from the base file(excelsheet1) and similarly while writing avoid headers(excelsheet2) .

Please note : For this you need to write from second row (i.e. A2 or anything) and also the headers should be fixed in the source file (excelsheet2)



That worked. Thanks!

1 Like

kindly help with, the datatable has value “0” in every row but I need to read the value as 0 only.


Did you remove “add headers” property from the activitiy?

1 Like

Try it with “add header” checkbox add or remove(if you have duplicate data in rows then add header) and check it

1 Like

Thanks that worked!!

1 Like

Hi All,

Even I’m getting the same issue. But I want to do Read Range(DT) on an Excel. After I need to extract data from that DT using the Header.(Using GetRowItem).

I we skip to add Headers(Checkbox Readrange) I cannot achieve the getRowItem using the Header Name.

Is there any other way to Eliminate this Error ?

@Vikas.Jain or @Gabriel_Tatu could someone please help me regarding this issue?

1 Like

i m not sure i understand what you are trying to do, but if you have 18.2.3 studio, we have some new datatable activities that might help you