Cannot find column [Total] because it is duplicated

I am trying to make a filter, all the values must be selected except the value 0 that appears as “-” in the excel two columns appear and with assign “variable1.Select (” [Total]> = ‘0’ "). CopyToDataTable me gives error "Assign: Cannot find column [Total].

Cheers

Hi

kindly check whether ADD HEADERS is enable in the READ RANGE activity and also if so we need to check with the column names in the excel whether there is any column named Total
@Manoli_Puente

ADD HEADERS is not enabled and there are indeed two columns with the same name Total

fine
then this expression would help you if we know the column index where it starts from 0 for the first column

dt = (From row In dt.Select
Where Convert.ToInt32(row(yourcolumnindex))>=0
Select row).CopyToDataTable()

Cheers @Manoli_Puente

Please could you clarify a little more, I can not do the assign without error.

Thank you

1 Like

sure buddy
but where you got stuck
did this expression helped us on this
@Manoli_Puente

(From Row In guion.Select.Where Convert.ToInt32(row(6))>=0 Select Row ).copytodatatable()

copytodatatable()
does not recognize it and still giving error
dt=guion