Hello
I know probably its something that I can do with a split a foreach activities but i would like to know if is possible do it in Linq.
My input is a string, is the following:
“Column1,Column2,Column3,Column4,Column5,Column6,Column7,2022-03-01,357159,741852963,33.12,PLAYSTOE,$1.00,table”
And my outputthe idea should be a DataTable looks like this:
The string no always contains only 7 columns, could coldatins more or less so the idea its should be dinamic, its mean indicating the number of columns.
The string does not contain the line breaks, it only contains that string, I understand that the string can be converted into a list.
But I want to know if it is possible, I don’t need to convert it to CSV.
The question would be, is it possible to use that String that does not have line breaks indicated to convert it into DT?
My exact need is to convert that String into a DataTable, I don’t need to write it in an excel or a CSV, I need to convert it into a DataTable.