Learner007
(Uipath Learner)
July 24, 2022, 4:24pm
1
Hi Everyone,
I’m facing an issue in excel split, I have a column it is having multiple rows of data i want to split it into multiple columns.
I’m attaching my excel. it have sample data and output also.
If Temp value is empty i need to write it as Ownset
Sample file split.xlsx (16.7 KB)
Can anyone guide me which formula i need to use there to get that kind of output
1 Like
Hey @Learner007
Use the for-each row to iterate rows & you can do the below inside loop !
You can please pass the below into De-serialize Json activity & set the TypeArgument to DataTable
"{" + str_RowData.Replace(Environment.Newline,",") + "}"
Thanks
#nK
Learner007
(Uipath Learner)
July 24, 2022, 5:28pm
3
Hi @Nithinkrishna
I’m getting some error I’m doing something wrong here can you correct me.
ppr
(Peter Preuss)
July 24, 2022, 6:11pm
4
when surrounding with { } we will not get a valid JSON as the property names / String values also need to be quoted
We can use regex e.g.
and referring to the groups:
(,|\b)(.*?)(:)(.*?)(,|$)
This CheatSheet introduces the basic use of regex functions. With further examples also special cases are presented.
Introduction
From the namespace System.Text.RegularExpressions following methods are offered:
Regex.Match
Regex.Matches
Regex.isMatch
Regex.Replace
Regex.Split
A simple usage for example would look like this:
[grafik]
Recommendation:
add System.Text.RegularExpressions to the imports:
[grafik]
it allows to use the shortened statement, as the namespace part can be ommited…
As mentioned above we can also do it line by line and will split it before with vbLF
1 Like
Learner007
(Uipath Learner)
July 25, 2022, 3:04am
5
Thanks @ppr by using this regex code, i made a flow with few more activities. It is working.
Hey @Learner007
In the output property of the De-serialize activity use a data table variable please.
Thanks
#nK
Learner007
(Uipath Learner)
July 25, 2022, 12:41pm
7
Sure @Nithinkrishna i will try that
1 Like
system
(system)
Closed
July 28, 2022, 2:37pm
9
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.