How to format the str_datatable into proper format?

Hi Team,

In my process I converting the datatable to string datatable format like below:
image

However, I want to format the same data in very good format. For example:
image

experts. Please help. @ashokkarale , @Gowtham_K115 , @singh_sumit

@hacky,

If default output format doesn’t suite your requirement, you will have to do iteration through For Each or LINQ to add leading and trailing empty spaces.

Check what’s the length of characters in each | symbol.