Accessing the DataRow Fields

I have a datarow that consists of approx 15 columns and, instead of keeping each value in the variable, I want to access using: Row.Field(columnIndex). But, I get some weird error " ‘.’ expected". How can I resolve it?

Thanks for the suggestions.

@nlimits, References:
Capture the cell data from each row using Ui path
Checking if one data from an excel matches another , then getting the crossponding value

Dominic :slight_smile:

@Dominic, thanks for the suggestion. So, it’s only possible to refer using headers ? Because, indexes were more applicable in my case.

@nlimits, No. You can even access it with indices as well. Refer the second link.

row(0) - First column
row(1) - Second column

Dominic :slight_smile:

1 Like