Read range - cell value pass as string

I try to read range and cell value (email id) as outlook recipient address but it showing as integer value as output.

Here we require cell value (email id) as outlook email id to send…

email id1

@Raj_Nadar

you are getting lists as list variable i belive

You need to use For each and give Type argument as String

OR

for accessing first value you can use

lists(0) .tostring

Mark as solution if this helps

Thanks

1 Like

we are getting list from datatable as list(0).tostring not supported.

assign - (From r In emailDT.AsEnumerable() Select r.Field(Of String)(“Email List”)).ToList()
Convert.ToInt32(“Email List”).ToString

for each we do not want use as i have one cell contains data… however i used following as assign but it does not work.

assign - (From r In emailDT.AsEnumerable() Select r.Field(Of String)(“Email List”)).ToList()
Convert.ToInt32(“Email List”).ToString
lists(0) .tostring

@Pradeep_Shiv @Palaniyappan

Can you spent sometime and update

1 Like

Hi @Raj_Nadar

You may have list variable Right ??

So with in that list variable you may access each element by using “.ElementAt(index_position)”

For Eg :-
I have this below List variable i.e getSheets
image
So i can access each element within the list by using following function
image
And you want that every element to be stored as a string then you can do the “.ToString”
image

And if you want to store those emailid’s in a single variable without using For Loop for those many element then you can do the following thing
image

And it will be easy if you use for loop like this
image

Hope this may help to solve your issue
Mark as solution if this helps

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal

2 Likes

Hello @Raj_Nadar,

String.Join(" ",lists)

Cheers

@Pradeep_Shiv… wow…

1 Like

Happy Learning !
@Raj_Nadar

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