Split the paragraph

I BILL OF MATERIALS
I MARK | QTY | SIZE | DESCRIPTION
l 1 | 17.0M | 750 |PIPE, STD WT, SMLS, 3E, ASTM A1O6—3, ASME 336.10
l 2 | 1 | 750 |EIANGE, BLIND, CL150, RF, ASTM A105, ASME 816.47 SERIES A
3 1 400 SPADE AND SPACER SET, CL150, RF, AS1548 — 7 — 460 /
ASTM A516 GR60, ASME 316.48
l 4 | 2 | 750x400 |TEE, REDUCING, STD wr, 3w, ASTM A234—WP3, ASME 316.9
5 1 400 FLANGE, CL150, WN, RF, STD WT, ASTM A105, ASME 316.5, C/W
JACKING SCREWS (REF STD DWG)
l 6 | 3 | 400 |FLANGE, CL150, WN, RF, STD WT, ASTM A105, ASME 316.5
l 7 | 1 | 750 |;LANGE, CL150, WN, RF, STD WT, ASTM A105, ASME 816.47 SERIES
8 16 1"x175 STUDBOLT, ASTM A193-B7, cm 2 NUTS, ASTM A194—2H, GALv,
THREADED T0 UNC T0 ASME 818.2.1 & 2
9 16 1"x145 STUDBOLT, ASTM A193-B7, cm 2 NUTS, ASTM A194—2H, GALV,
THREADED TO UNC TO ASME 318.2.1 & 2
STUDBOLT, ASTM A193-B7, C/W 2 NUTS, ASTM A194—2H, GALv,
10 28 1 1/4”x225 THREADED TO UNC T0 ASME 818.2.1 & 2 (FOR SERIES A
RANGES)
11 3 400 GASKET, SPWD, CL150, SS WINDING, GRAPHITE FILLER, 31633 INNER
RING, C3 OUTER RING, 4.5MMTHK, ASME 316.20
12 1 750 GASKET, 3PWD, CL150, SS WINDING, GRAPHITE FILLER, 31633 INNER
RING, CS OUTER RING, 4.5MMTHK, ASME 316.20 SERIES A
l 13 | 1 | 750 |ANTI VIBRATION CLAMP, TYPE CL—1—ST—T
I 14 l 5 l 750 ISTRUCTURAL STEEL SUPPORT

This is the text where I need to split each line and from each line, I need to split data 1 17.0M 750 rest words till the line ends need to do for each line and add to excel how could I achieve it

you need to split based on pipes?

StringArray = StringVariable.split("|"c)
the use For Each Loop to Get each Strings
and Use Add Data Row to add these values
cheers @soumi_soumiya

1 Like

But Pipes are not available in all line

Hi @soumi_soumiya, how will you get the Text Paragraph ? can you share the source file without Pipes ?

you can replace with any characters

Pipes will be there

What is the Content you want in the Paragraph ?

if pipes will be there, then you can use this
StringArray = StringVariable.split("|"c)
the use For Each Loop to Get each Strings
and Use Add Data Row to add these values

1 Like

I need
1
17.0M
750
PIPE, STD WT, SMLS, 3E, ASTM A1O6—3, ASME 336.10
Like this, i need to split from each line

Yes,you’ll get it like this only

Did you try this Method ah?

Thanks for your reply
What should be the variable type of stringarray

arrayofStrings

1 Like

StringVariable should be of which type

String Variable is of type String only in which a you are storing this value
I BILL OF MATERIALS
I MARK | QTY | SIZE | DESCRIPTION
l 1 | 17.0M | 750 |PIPE, STD WT, SMLS, 3E, ASTM A1O6—3, ASME 336.10
l 2 | 1 | 750 |EIANGE, BLIND, CL150, RF, ASTM A105, ASME 816.47 SERIES A
3 1 400 SPADE AND SPACER SET, CL150, RF, AS1548 — 7 — 460 /
ASTM A516 GR60, ASME 316.48
l 4 | 2 | 750x400 |TEE, REDUCING, STD wr, 3w, ASTM A234—WP3, ASME 316.9
5 1 400 FLANGE, CL150, WN, RF, STD WT, ASTM

But i am facing error regarding the variable type

from where are you getting this entire data?

For time begin i am getting from text file but in reality i will get the data from a regex output

take that TextFileOutput Variable and put it StrVariable

1 Like