Cannot find Column 1 in For Each Row on Second Iteration

Hi Guys,

I have a data table that have 23 column, the header column name is 0, 1, 2, … 22

Then, I want to input the data, column per column using for each data table,

I’ve assigned variable that each iteration will add 1,

First iteration it work, but when second iteration, it didn’t work,

The error is “cannot find column 1”

I’ve checked to find column names with message box, and the column name not wrong,

Can you help me guys?

Thanks before

image data table

@Malvin_Aubin_Darpito Kindly check your column name is there any spaces at the last or first of the Column name?

@Malvin_Aubin_Darpito
Possible reasons
1-column headers should be inclose with “”
2- space in start/end of headers
Try like this Row.item(“column name”).Tostring.

Hi,

Can you check if your datatable (parameter_allsite) has 2 or more columns?
We can check it by parameter_allsite.Columns.Count or locals panel when exception occurs.

Regards,