I have a excel file where is column that have few numbers which is 16 digit and 12 digit mixed.Like
I need to find, if number is 16 digit then it will search 11 and 12 position of a number and find ‘99’ in 11 and 12 position then print find number else no and
if number is 12 digit then it will search 9 and 10 position of a number and try to find ‘99’ in 9 and 10 position then print find number else no
please some one help me.
Please try this,
Read the excel and Store in datatable. Variable name dt
Use for each row
Inside for each put an if activity and condition will be row(“columnname”). tostring.length = 16
In then part of if activity put another if activity and in condition give row(“columnname”).tostring.substring(11,2) = 99
In then part put log message and give row(“columnname”). tostring and in else give no
Do same like that for else part of first if condition…
row(“columnname”).tostring.substring(9,2) = 99 - it will search for 9th and 10th position
we can do with regex:
Hi @prasath_S , its not working. Can you check my workflow?
can you share your workflow please…
I am newbie in forum thats why i am not able to upload. Please check this link
Please use this workflow,
use your column name instead if columnname,
sample.xaml (9.8 KB)
Did you check my workflow with file?
your flow showing error:
“If: startIndex cannot be larger than length of string.\r\nParameter name: startIndex”,
Is all the number greater that 10 and also did you check the logs how many number and no came…
CurrentRow(“Loan Account”).tostring.substring(9,2) = “99”
(9,2) is it start with 0 or 1 when it will count?
It will start at 10th position and have 2 characters,
If the string is abcdefghijklmno then the result is kl
- Kl is the 10th and 11th postion of the string “abcdefghijklmno”
2.the string index starts with 0.
3.yes it will work
Please find the updated workflow and excel,
I have deleted the first row in your excel,
The new sheet called result wiill be created,
sample (1).xaml (14.8 KB) Calculation Sheet - Copy.xlsx (18.3 KB)
Actually it’s great but look value display
I need to display exact value not like msg box. How it is possible?
and its showed length is 20
Hey I am really sorry to say again.
Did you check?
Yes i removed the message box already dont know how old file uploaded,
can you check this workflow has any message box , if it didnt it should work
sample (1).xaml (14.8 KB)
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.