S112:Invoice Extraction Using Linq Query

Hi ,

From the below attched format Text file / Below sample text I want to extract the fields such as “Billed To”, “Date of Issue”, “Invoice Number” “Due(INR)” from the bulk of 5 text files using LINQ Queries in UiPath.
Please suggest the Universal Linq Query code to extract the information from all files using the same code.

Format : ExpoHub
123456789
expohub street
ABC
123456
India

Billed To Date of Issue Invoice Number Amount Due (INR)
Nagesh Reddy. 22/04/2020 873101. Rs.26,178.00
Due Date
22/05/2020

Description Rate Qty Line Total

Shared Hosting Rs.25,878.00 1 Rs.25,878.00

LateFee Rs.300.00 1 Rs.300.00

Rs.0.00 1 Rs.0.00

Subtotal 26,178.00
Tax 0.00

Total
Amount Paid
26,178.00
0.00

Amount Due (INR) Rs.26,178.00
Invoice.txt (423 Bytes)

Ext.txt (425 Bytes)

Thanks in Advance,
Harsha.

@Harsha_S1

If you have the same format of Invoices, then Instead of using Linq Query, you can use Regex expressions to extract the information

Try with Regex Expressions and let’s us know where you struck, so that you can get the help

Thanks,
Srini

Please suggest the regex expressions for the mentioned fields.

Thanks in Advance,
Harsha.

Hi @Harsha_S1 ,

Please find below regex to get the value
Regex 1 to get the particular line item
(?<=\(INR\))(.|\n)*(?=Due Date)

Regex 2 to get all the values
(\D+ )|(\d{2}\/\d{2}\/\d{4})|(Rs.*)|\d{6}.

Regards,
Arivu

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.