Dear all,
I have received some invoices in PDF format which including Vendor number and Invoice no.
May i know how i can search and save it in a data table?
eg:
Vendor Code: 00001
Invoice No.: 12345
Thanks so much
Dear all,
I have received some invoices in PDF format which including Vendor number and Invoice no.
May i know how i can search and save it in a data table?
eg:
Vendor Code: 00001
Invoice No.: 12345
Thanks so much
Hello,
First read pdf that will give us string variable then use substring() method.
or
can you attach your pdf?
Cheers,
Pankaj
Dear Pankaj,
Sorry that as a new user i am not allowed to upload a file.
The invoice look like that:
@shing3322 First read the pdf file read pdf text activity. Then try statements and let me know.
String Vendor = System.Text.RegularExpressions.regex.Match(StrVariable,“(?<=Vendor Code: ).+”).ToString
String Invoice = System.Text.RegularExpressions.regex.Match(StrVariable,“(?<=Invoice No: ).+”).ToString
StrVariable is variable of String Type which is the output of Read PDF Text activity.
No problem,
Please find below example, you will have to modify few things in my code,
FindInvoiceNoSave.xaml (24.7 KB)
Cheers,
Pankaj
Hello.
I Think it’s the best way to recognize fixed text orientation in OCR.
This site can’t upload some files for new user. So I can’t upload sample xaml file.
Thanks.
@Manjuts90, thanks so much, i can get the Vendor number correctly, but not the invoice no.
How could i get the Invoice No. correctly at this situation?
Thanks so much.
@shing3322 For invoice number try like below.
String invoiceNo = Split(StrVariable,“Vendor Code:”)(1).Split({Environment.NewLine},StringSplitOptions.None)(1).Replace(“:”,“”).Trim
This will for current input as shown in screenshot, try let me know.