I am getting data in below format in ExtractDataTable and i want to write this in Excel in column like STR-00C-2SF9 NICD SAFT… in one column and so on.
[New column 0
1 - STR-00C-2SF9
NICD
SAFT NCX125 (NCX12502164480)
324 lbs
16.5 X 33.5 X 10.2
04/26/2001
0
48
2 - STR-00C-2SG7
NICD
SAFT NCX125 (NCX12502164480)
324 lbs
16.5 X 33.5 X 10.2
04/26/2001
0
48
3 - STR-00C-2S93
NICD
SAFT NCX125 (NCX12502164480)
324 lbs
16.5 X 33.5 X 10.2
04/26/2001
0
48
]
Hello @Puneet_Singh1 ,
As this not of a table format you need to convert this to row-column format.
You can do as below.
1)First convert datatable to string using Output Datatable activity and you will get a string output.
2)StringArray = Yourstring.split(“-“c)
3)yourString.Split(Environment.NewLine.TocharArray). Here your string is each value from the array. For eg:StringArray(1),StringArray(2) etc…You can use a loop to get these values.
4)StringArrayNew=yourNewString.Split(Environment.NewLine.TocharArray). (StringArray(1).Split(Environment.NewLine.TocharArray)
5)String = String.Join(”,”, StringArrayNew)
6)Then use Text to Datatble activity and convert that to a table format
UiPath- Text to DataTable |Generate DataTable & Text to Columns activities - YouTube