Input data given in excel need to get the total quantity

Need a help
I am giving input data as mentioned below . The bot will fetch and run based on the input one by one in loop. I want to capture the total number of input data given if an user gives in the input file Is it possible to capture that in orchestrator?
Input Data:
Test Demo_28096
Test Demo_28097
Test Demo_28098
Test Demo_28099
Test Demo_28100
Test Demo_28101

Thanks!
Note: I am a beginner of uipath!

Hi @VB_Chel

Welcome to Uipath community

You can try with reflex expressions

System.Text.Regularexpressions.regex.match(yourstring,”\d*$”).ToString

It will get only number from the input data

Regards
Gokul

@Gokul001

Thanks!

can you tell where i need to give the reflex expression . Is it possible to capture that in log or in orchestrator

Where the user will give the input data/ file? @VB_Chel

The log message in the orchestrator that what we are giving in the studio. So you need to give the input string inside the expression.

Use assign activity and pass that expression in RHS

1 Like

@Gokul001
Thanks for helping !

The user will give the input data in excel which is stored in the user’s local system.

Then how will you read the excel file? @VB_Chel

Hi @VB_Chel

If you can able to read the excel file. If yes try with the below following

  1. Read the excel file and store it in data table variable - dtread

  2. use for each row in data table activity

  3. use assign activity

LHS -create an string variable
RHS - System.Text.Regularexpressions.regex.match(currentrow(“column name”).ToString.trim,”\d*$”).ToString

It will get the number.

I used Read Range workbook and called the excel file.

I don’t want the number mentioned in the Input file. i want number of quantities for example as mentioned below i need to get “total number of 6 input is used”

Name
Test Demo_28096
Test Demo_28097
Test Demo_28098
Test Demo_28099
Test Demo_28100
Test Demo_28101

Sorry for wasting ur time

Hi @VB_Chel

If you need row count of the excel

  1. Read range activity store it as stop

If yes try with this below expression

Dt.Rows.Count

Regards
Gokul

1 Like