Hi Everyone,
I have a string i want to split only required data based on space. Can anyone help me with that.
input from Text file:
NEW LINE EQUIP 22.00 32.00 30.00 0.00 10.00 0.00
PHY THE APY 2.00 3.00 17.00 0.00 16.00 0.00
Required Output in Excel:
A B C D E F
22.00 32.00 30.00 0.00 10.00 0.00
2.00 3.00 17.00 0.00 16.00 0.00
i would recommend regex but if you want to use string split:
“your input string”.Split({" "},stringsplitoptions.None)
from there you can get values based on index or loop the array in reverse order.
ppr
(Peter Preuss)
3
@ranaprathap928
have a look on the generate datatable activity
once it it readin / generating the datatable it can be written to excel with a write range
Hi @nameless It is splitting all data but i want only that numeric should be splitted.
@ppr no it is writing all data in single column, I want that amount should be in different columns like mentioned above in my question.
ppr
(Peter Preuss)
6
it should write in different columns. can you send some sample data and some screenshots from your implementation? Thanks
@ppr new.txt (595 Bytes)
Input text file
Required output
ppr
(Peter Preuss)
9
thanks please also shgare screenshot from your implementation
@ppr PDF_TableExtraction.zip (219.5 KB)
This is my flow which i’m trying to extract details
ppr
(Peter Preuss)
11
Can you check following:
As you want to split on spaces configure it like:
ppr
(Peter Preuss)
14
Lets come back to your initial question:
input data (@ char just represents that the test rest unparsed)
used in a generate datatable with following settings:
Will have folloing datatable as result:
it looks very close to your request.
Extracting the number part from line can be inital done with the help of regex:
Now it depends on the real data if some enhancements are needed
Hi @ppr this is solved my 50% Problem. Thanks for the help.
system
(system)
Closed
16
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.