Unable to read values stored in column of multiple rows


#1

Hi,

Below is my scenario:

I have an excel that has multiple rows. It has got 2 columns. All the cells have some integer/string values.
I want to read all the values and then write them in the output window.

In continuation with the above request, I would use those values accordingly in the web page(different text fields)

Thanks,
Anshul


#2

@anshulagarwal

If you want to display the values in output window use OutPutDataTable Activity and then use log message activity to write the string which you got from OutPutDataTable Activity .

Then You can access the values like this
dt(RowIndex)(ColumnIndex) or dt(RowIndex)(ColumnName).ToString

Regards,
Mahesh


#3

Hi @anshulagarwal,

Convert.ToString(dt.Rows(RowIndex)(ColumnIndex))
Or
Convert.ToString(dt.Rows(RowIndex)(ColumnName))

Here RowIndex and ColumnIndex are interger
ColumnName is string

You can use Output data table activity to get entire table as a string .

Regards,
Arivu


#4

Thanks for the response.
I will try and update.

Thanks,
Anshul