Changing the distinguisher with tab for a datatable

Hi,
I have a data table and while writing it into a text file it is written with a delimiter as “,” and I need to separate it using a “tab”.
For Reference I have attached screen shots of what I am getting and What I need as an output.
Output we are getting :-
image
Output we want:-
image
Can anyone suggest any solution for the same please?

@Kunal_Jain

// InputText is the string variable containing the content of the text file
Assign: ModifiedText = InputText.Replace(",", vbTab)

Hi,

Hope it works for you,

Regards,
Vinit

Hi @Kunal_Jain

→ Read CSV
Input:
image
Output-> dataTable
Use the below syntax in Assign:

Output = String.Join(Environment.NewLine, dataTable.AsEnumerable().[Select](Function(row) String.Join(vbTab, row.ItemArray.Select(Function(item) item.ToString()))))

Output:


Regards

grafik

Thanks @Vinit_Mhatre for the solution.

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