Read range error belongs to datatable

Hi,

I am trying to read an excel file and getting this error.

Hello!

It’s kinda obvious… there are two colunms with the same name. My advice is to rename the colunms (if possible) or uncheck the “Addheaders” option. When you uncheck the AddHeaders option you have to use the Index of the column to access each one. Or you just have to build a new dataTable with the right names and then copy the data to this new one.

Regards,

I am using append range, so i think we dont have option to choose headers on it.
and in excel it does not have any same column names

Are you reading it into the same datatable variable of one that already exists?

2 Likes