Get specific value from text file

HI I try to get specific value from the text file. sample text file as below:

Tr Trans Transaction Transaction Trans Value OS Balance Payment Run
Ty Number Date Supplier Refere Description Pd in Base Base Number


                               Supplier : ABC COMPANY

IN 002005154 2-OCT-2017 31062 Purchase Invoice2005154 12 67,628.00 67,628.00 2000719
IN 002006342 26-DEC-2017 31647 Purchase Invoice2006342 02 26,500.00 26,500.00 0
IN 002006345 26-DEC-2017 31646 Purchase Invoice2006345 02 85,330.00 85,330.00 0
IN 002007859 4-FEB-2018 31896 Purchase Invoice2007859 03 23,133.44 23,133.44 0

I would like to get value 26,500.00, 85,330.00 and other value start with IN .

Really appreciate if anybody could advise on how to do it.

Thank you
Regards
Jamuri

Hi @jamuri,

Use Genrate datatable activity. It will convert String to Datatable based on spaces and Newline.

image

Now to get values, you can either loop using for each row or use below code.

Assign Amount1 = Datatable.rows(1)(7).tostring
Assign Amount2 = Datatable.rows(2)(7).tostring

Hi Vivek,

Thanks for your reply and advise. The full text file as below and I did try to follow your advise but the preview out put is not correct.

AP_R_075 26-Oct-2018 14:28 Company: 20: NEGERI SEMBILANc cc Page 1
Division: BB
Supplier Outstanding Balance As of Pd/Yr Report
as at: 30-Sep-2018
Details Of Open-Items By GL Key Within Supplier In Base Currency: MYR:

Tr Trans Transaction Transaction Trans Value OS Balance Payment Run
Ty Number Date Supplier Refere Description Pd in Base Base Number


                               Supplier : ABC SDN

IN 002005154 2-OCT-2017 31062 Purchase Invoice2005154 12 67,628.00 67,628.00 2000719
IN 002006342 26-DEC-2017 31647 Purchase Invoice2006342 02 26,500.00 26,500.00 0
IN 002006345 26-DEC-2017 31646 Purchase Invoice2006345 02 85,330.00 85,330.00 0
IN 002007859 4-FEB-2018 31896 Purchase Invoice2007859 03 23,133.44 23,133.44 0

sample textfile.zip (633 Bytes)