Convert String into DataTable

Hello All,

I want to convert string into DataTable, My Column seperator is Newline and Row seperator is also Newline.

Sample data
Account Owner
Edited By
Field / Event
Old Value
New Value
Edit Date↓
Account Name
TC BID
Integration User
Account Owner
XYZ
Integration
3/20/2024 7:32 AM
SLS
12346
Integration User
Account Owner
Integration User
XYZ
3/20/2024 7:29 AM
ABCD
1234

Column Names:
Account Owner
Edited By
Field / Event
Old Value
New Value
Edit Date↓
Account Name
TC BID

Row 1:
Integration User
Account Owner
XYZ
Integration
3/20/2024 7:32 AM
SLS
12346

Row 2:
Integration User
Account Owner
Integration User
XYZ
3/20/2024 7:29 AM
ABCD
1234

Please help!
Thanks in advance

In general we can create CSV Data like:
grafik

and can use it within a Generate DataTable Activity

Kindly note:
there are more Headers (8) as Data Column Values (7) within the sample

Your column names and row data does not seem to match. You have 8 column names but only 7 row contents. If they are always unitform (8 columns, 8 row data) then that would be doable by converting the string to array, do loops based on mathematical logic that every 8 item in the array are tablerows

TextToDatatable.xaml (10.7 KB)

The above workflow has the code to convert the provided text to Datatable. But as mentioned by others, it will fail if the values are missing for any of the columns.

Thanks you so much!
It is working as expected.

1 Like

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