How to extract the mail body unstuctured mail body?And extracted and stored in varaible but i required only specfic data how to get required data from mail body?

in my case i extracted and stored into varaible but i want write the content in excel there is some much unwanted text but i want only required data what i need how to do this ?
Kindly update rate for Import N Export

US Dollar IMPORT 84.85 EXPORT 83.10 EURO IMPORT 93.85 EXPORT 90.70

Hi @Naveen_Kanike

(?<=IMPORT\s+)(\d+[.,]\d+)

(?<=EXPORT\s+)(\d+[.,]\d+)

Regards,

Hie @Naveen_Kanike follow these steps
above assign is your input
2 assign is a variable of -Matchcollection browse in variable panel


after this use a for each activity to get these data one by one loop through

for IMPORT pattern is same just changed the EXPORT with IMPORT and variable remain the same for this also

Cheers Happy Automation :smile:

its not working
check the below flow please




Screenshot 2024-08-21 141822

Can you show us the mail body extraction result??

this is the mail body before regx expression where i stored in a varaible and print in message box


this the after the regx expression where try to print the regx in message box

Screenshot 2024-08-21 143249

@Naveen_Kanike

Try this

Sequence15.xaml (15.1 KB)

Output:

The image shows an output log from a software displaying the start and end of "BlankProcess23" with import and export values ranging from 83.10 to 93.85. (Captioned by AI)

Regards,

Hie @Naveen_Kanike as i can see you output result after IMPORT it have 2 space and then value … thats why my regex pattern not giving you the value … try with this logic
System.Text.RegularExpressions.Regex.Matches( strregex,“IMPORT\s\s(\d+.\d+)”)
like the code is same but you have to add one more space like this …
try and let me know the result output …
or if not working use the UiPath Find Matching Pattern activity

cheers

i want the US Dollar and euro also what ever it may be sometimes there could different country curreny also i want them in dynamically ie., us dollar, eur, other counties currencys.

below format i have store it always in excel
Currency Port Value
US Dollar IMPORT 84.85
EXPORT 83.10

Currency Port Value
EURO IMPORT 93.85
EXPORT 90.70

Hi @singh_sumit ,

are you there ?

@Naveen_Kanike yes …

can you look the above thread conversation @singh_sumit

@Naveen_Kanike if you have to extract that data and save into the excel sheet regex pattern give you the value. you can store them and use build datatable and add row activity and one write range activity to pass them and for country name make a different regex pattern . because you cannot extract whole logic in one code …so extract them one by one and write them into the excel. this way you can extract …

Nothing is printing in message box

Then how to give regx for the any type of country currency

just its printing the IMPORT N instread of IMPORT 85.85

@Naveen_Kanike

Can you try the below

Sequence15.xaml (19.5 KB)

Output:

The spreadsheet lists currency types, port activities, and their corresponding values in columns A, B, and C, respectively. (Captioned by AI)

Regards,

Iam getting this error when ever I try to write range workbook

@Naveen_Kanike

Delete that activity and readd it

I did it so many times its not working it

@Naveen_Kanike

Are you running my xaml or you replicate it

Try to update UiPath.System.Activities Package