Change every value in datatable to string

I have a datatable with three columns. The first column is String while the second and third column is Double. How do I change the latter two using linq? I used Windows hence most custom activities are not supported.

Hi @arina ,

Can you provide sample input and expected output


One of more options is datatable reconstruction approach

Build datatable activity, configure an empty datatable with the three columns as of datatype: String - dtResult

Assign activity:
dtResult =

(From d in dtOrigVar.AsEnumerable
Let ra = d.ItemArray.Select(Function (x) If(isNothing(x),"",x.toString)).Cast(Of Object).toArray
Select r = dtResult.Rows.Add(ra)).CopyToDataTable

I want to merge these two data tables but as you can see, their datatype mismatch. dt_Statistics comes from Read Workbook Range containing only headers. Is there any way to make sure the type is always String when being read?


In general we would recommend to scope 1 Topic = 1 case
Other researchers can find faster solutions for their similar cases
given solution was matching to the initial requirement description

we would recommend to close / let closed this topic by its origin case and opening a new topic along with case description and sample data.

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