DuplicateNameException

excel
activities
p_notaproblem

#1

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.


#2

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)

V


#3

That worked. Thanks!


#4

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


#5

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


#6

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


#7

Thanks that worked!!


#8

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 ?


#9

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


#10

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