Hello to experts, please kindly help. I would like to know how to convert the data table into a string with a preferable reading format.
I have done the read range workbook from an Excel file and converted it to dt_description.
In dt_description, we got multiple columns. | Name | Age | Gender | Number | Hight | Weight | Description | Type |
| Marcel| 55 | Male | 0800 | 166 | 67 | Like to drink coffee | Flat White |
I have tried to use the output data table to convert it to string and type into a column to check the format, but it seems very difficult to read.
Is there any chance that I can convert it into the format below?
Yes we can do this but we will have to code through this. Use For Each Row in DataTable activity and keep appending the Column name and value to the output string.
It’s feasible only for smaller datatable. If have to do it on large datatable, it will be time consuming.
Hi, thanks for your reply.
Yes, what the message box shows is the preferable format that I want.
May I know in detail how and why you input the codes? Please.
It seems your requirement is to handle set of column name and data in the first row. So, first, I create dictionary which has column name as key and data as value by the following expression.