How to solve 'VisualBasicValue'1' compilation error when trying to convert datatable to single list variable?

I am trying to take data from an excel column as list my excel file looks like this
I want to take the datas from Invoice column and write them in a web page as a list with space between like TA1234 TT1234 KL6278

I tried
( From row in ListData.AsEnumerable() Select Convert.Tostring(Row(“Invoice”)) ).ToList()
But I am getting the error

How can I solve this problem?

Hi @makboga ,

Could you Check with the Below Expression :

ListDataStr = String.Join(" ",ListData.AsEnumerable.Select(Function(x)x("Invoice").ToString.Trim).ToArray)

Here, ListDataStr is a string variable type.

Also, Let us know how you are using the Expression and a Screenshot of it’s implementation in Studio to better understand the situation.

It worked perfectly thank you for quick response.
Unfortunately, I cannot share screenshots because of my company’s policies.

1 Like

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