Missing item in DataTable

I used ReadRange, then watched the value of dt and noticed a difference between dt and dt.Rows(). item1 is missing in dt.Rows() value. Could you please help explain this?

what is the issue that you are facing ?

@Anonymous_iL

the first row is taken as header and not a row item so it is not displayed in rows collection

check the same

ideally in datatable first row if no column names are present would be see as column1,column2 etc and then the data as you see

cheers

i pass dt into invoke code

   foreach (DataRow row in originalTable.Rows)
    {
        if (row[0] != null)
        {
            Console.WriteLine(row[0].ToString());
        }
    }

item1 still missing, how to deal with it?

@Anonymous_iL

in the dt as mentioned the first roe you see is the header

do dt.columns(0).Columnname and similarly with 1 …you would see item1 and 50

I am not sure how you are reading this data if from excel…then in read range remove has headers

it is not a row…it is a header

cheers

1 Like

show us, properties screenshot of Read Range activity

Thanks @AkshaySandhu @Anil_G
I solved it by removing Add header checkbox of Read Range activity.

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.