Read Range: The header row contains more than one field name

Hi everyone,
I have some problems about this known issue but is a different cause. I tried to uncheck the option “Add header” but I get the same result. I need to get all data from row A8 from an excel file, look at the picture for more references. I hope you can help me people.

thanks in advance.
Regards from Peru

1 Like

@jorge_10

In Read Range activity, specify range as “A8” and then it will start read from A8 cell to till end of the data.

1 Like

@jorge_10
e.g. with the set on option AddHeaders Row 8 would be treat as the column name row. Col 7 and 8 are the same (1/3/2019 and leads to the error, due Columnnames are not longer unique.

Your screenshot is indicating the right setting by ticking off AddHeaders. But also the screenshot we do see the * so indicating the xaml is not saved.

So just do a proper saving, Best close and open XAML again and rerun the code. Let us know the result of this. Thanks

2 Likes

Hi @ppr

Col 7 and col 8 are different columns but for reasons of business it could contains same values, sometimes. I hope that you can help me. Thanks for response. Check the pic.

1 Like

@jorge_10
Yes the cols are different. But with addHeaders the value of Column 7 and 8 are the same. These 2 values would be used for column name and this is not possible as ColumnName has to be unique (Thats why you got the error message)

Is it more clear now? If yes then we can go into the resolution round

But how can I solve this?, I need to get all data from this excel file. I was thinking to extract column by column but I don’t know if is a good idea. Performance could be affected. Any idea is welcome.

@jorge_10
One option would be. let start the reading at A8 ( if you need the row as well) without addHeaders options and column names will be generated with default name like Column0, Column1

A custiomizing within a later run could be done eg with renaming like YourDataTableVar.Columns(YourColumnNameOrIndex).Columname = “NewColumnName”

I did it but I get the same error message, check 2nd picture lines up. The original excel file is this. I tried to read at A7 with headers regardless of that, same result.

Add Headers is to uncheck

grafik

uncheck add headers - it will look later like the private checkbox
save xaml properly and let it run

Oh now it turns to be not funny :frowning:
Is your EXCEL confidential or can you share it here?
Please give us the information which version of UiPath you are using and which Excel Activities Version is in use

Next round is now that the issue will be replicated or vetoed

Yes it’s a confidencial excel file, I can’t share it. Version of UiPath and version of Excel Activities in the picture.

Ok thanks for details on versions - let this send now here in the forum for further processing