Sepearte value from string and write in excel

Hi friends,
I am stuck to write values in excel.
Here is my string and i want to write value in excel separately in following ways:- Line Item-R.xlsx (8.4 KB)

297 13424 h2go bfree Fusion Sport Bottle - 23 oz. 2.7750 824.18
0 - (Base, Trim) : Translucent Graphite , Stainless
Steel
1 Set-Up Charge Set-Up Charge 44.0000 44.00
1 *Prepro Proof Charge Prepro Proof per Color 24.0000 24.00
892.18

Regards,

@Rup_1
The string that you specified is an unsuctured one. You can still use regular expression and create a data table for the structure you want and write in the excel file. This works only for the strings with same structure that you specified. Any changes in the structure will not work.
Hope this helps.

Hi,
please find my workflow and bifurcate to line item like above excel:-
here are my workflow.Main.xaml (9.6 KB)

please suggest what should i do.

Hi,
@Rup_1

The string is unstructured, still you can try doing some string manipulations:-

  1. First of all, splitting the string by Newline
    Take the length of the array(6), and assign (length-1) index as the total value.

  2. Further, you can check whether string ends with numeric
    If Yes, then take the last 13 characters(2.7750 824.18, 44.0000 44.00, 24.0000 24.00) of those lines(Here we will get 3 lines as last line(total value also ends with numeric but we will replace in the string with blank),
    Furher, split them(13 characters) by space and check if It contains 0 after decimal, then just replace it with blank value.
    Now you got, Unit & Cost

if No,assign that value to descrption,(0 - (Base, Trim) : Translucent Graphite , Stainless
Steel)
Now, We have to manipulate remaining data:----

  1. 297 13424 h2go bfree Fusion Sport Bottle - 23 oz.
    1 Set-Up Charge Set-Up Charge
    1 *Prepro Proof Charge Prepro Proof per Color

Start splitting with space and get only 2 elements(i.e. 297 & Remaining string, 1 & Remaining Striing, ! & Remaining String), and assign zeroth index as Qty,
Now we are left with description…

Now take the Remaining String, and:-
You can try doing some substring operations.

I hope this helps.

Thanks for your support please take a look to my workflow,now i want to check whether string ends with numeric how i do.

Main.xaml (12.9 KB)

Use is match activity and set pattern as \d$

Hi,
As you given solution to me i am trying to implement this but still i am facing some problem so Please find my workflow and suggest further changes Main (11).xaml (50.6 KB)
SampleExcel_1.xlsx (11.5 KB)