@trunghai
Follow this steps.
1.Use for each activity to iterate all pdf files one by one…In for each activity… use…
Directory.getfiles(“YourFolderPath”,“*.pdf”)
2.In for each activity use Read Pdf text activity and give op as PDFText
3.Then use assign activty…
N0.=System.Text.RegularExpressions.Regex.Match(PDFText,“(?<=Tổng cộng tiền thanh toán:).+”).Value
4.Use this variable to write text in excel sheet.
hey just made it correct. it’ll work now but I’ve added one activity called select folder so at the starting of the workflow you need to select that folder.
just have a look here,
run this workflow and you’ll get the idea.
Note: You don’t need to read that pdf line by line. Read PDF Text will give you whole pdf text in string format.
If you’re expecting more than one numbers then let me know.
hey @trunghai, you want “123.456.789” from string “(Total): 123.456.789” right? Correct me if i’m wrong.
Then simply use replace method on that string.
lets take Str (string var) —> “(Total): 123.456.789”
then
take 1 assign, Str = Str.replace("(Total): ","")
so that it’ll replace “(Total): " by null value —>”"