How can we split the cell values in excel?

Hi Community,

This my excel format i want to split the cell values in sheet1 like sheet2 which i mensioned how can i do it please help me.

New Microsoft Excel Worksheet (3).xlsx (9.1 KB)

@naveen5

it looks like a json array…you can use deserialize and then convert to datatable

cheers

Hi @naveen5

  1. Read the cell value (A2) from Sheet1 and give an output as jsonString.

  2. Use the Deserialize JSON Array activity (from UiPath.WebAPI.Activities package) to parse the JSON array into a JArray object. Let’s name this output jsonArray.

  3. Build a datatable called as dtValues

  4. Use For Each activiy and iterate it for jsonArray and define index for the loop called index. Then add Assign activty in the loop.

  5. The assign expression must be like:
    dtValues.Rows(index).item(ColumnName)= CInt(jsonArray(index).ToString.Split("."c)(0))

  6. After the loop you can use write range activity to see the results.

Cheers.

Hi @Anil_G ,

how can i ?
can help me with flow pls

Hello @naveen5

Take a look at the attached solution.
This splits the text by comma and afterwards by period sign.
The results are appended to Sheet2.

System.Text.RegularExpressions.Regex.Match(currentNr.Split(".")(0),"\d+")

Excel Split.xaml (12.0 KB)

Regards
Soren

it write the data into 2 times like this

3300
200
3300
200

Hello @naveen5

It appends the rows after the existing in Sheet2.
It does not write it 2 times.

If you delete the existing rows in Sheet2, then it will only write them once.

Regards
Soren

ur understanding is wrongly ?

in sheet1 i have data now i want to convert as sheet2

here sheet2 is just an example we should not process the that data

if u could connect i will explain it

is it possible to connect now?

Hello @naveen5

Should the data simply over write the existing data from Sheet1?

If so then you can use a Build Data Table activity in the beginning in stead of reading sheet 2 (just keep dt_Sheet2 as the new table).

Then change the sheet on the last write range activity to “Sheet1”.

I can post an example later this evening.

Hello @naveen5

This flow will read an Excel file with the format you delivered.
Then convert it to the desired format and save a new file ConvertedExcelFile.xlsx
Let me know if this is what you are looking for.

g

Excel Split.xaml (12.9 KB)

Regards
Soren

Can any one connect please it will helpfull for me please

please help me ??? someone

@naveen5
Check with this solution once
Sequence.xaml (12.7 KB)