I want to convert file from text to column
but only issue is some rows are not aligned as others. I have attached text file and sample excel file that it should look like after conversion.
Text file -
IEEE Credit Memo Register
30-JUN-18 18:17
IEEE Service Center Trx Date From: 27-MAY-2018 To: 30-JUN-2018 Page: 1
Invoice Credit Memo Invoice Orig. Invoice Amount
Credit Memo # Credited Customer Name Customer # Date Date Code Amount Credited
-------------- ----------------- ---------------------------- ------------ ----------- ----------- ----- -------------- --------------
Reason: CANCELLATION
Product #: ----- GL Account #: XX-XXXX-00000-12345-RENEW-00000
203790 X-XXXXXXXXXXX Sam AAAAAAAAAAA XXXXXXXX 30-MAY-18 21-MAY-18 USD 45.99 0.00
203791 X-XXXXXXXXXXX John ddddddd XXXXXXXX 31-MAY-18 30-MAY-18 USD 152.50 0.00
-----------------
Total Amount Credited By Product # / GL Account # 0.00
30-JUN-18 18:17
IEEE Service Center Trx Date From: 27-MAY-2018 To: 30-JUN-2018 Page: 2
Invoice Credit Memo Invoice Orig. Invoice Amount
Credit Memo # Credited Customer Name Customer # Date Date Code Amount Credited
-------------- ----------------- ---------------------------- ------------ ----------- ----------- ----- -------------- --------------
Product #: ----- GL Account #: XX-XXXX-10000-21110-XXXXX-00000
203791 X-XXXXXXXXXXX John EEEEE XXXXXXXX 31-MAY-18 30-MAY-18 USD 152.50 0.00
203791 X-XXXXXXXXXXX John EEEEE XXXXXXXX 31-MAY-18 30-MAY-18 USD 152.50 0.00
-----------------
Total Amount Credited By Product # / GL Account # 36.30
Sample excel output that I need -
GL ACCOUNT NUMBER CREDIT MEMO CM NUMBER INVOICE CUSTOMER NAME CUSTOMER NO CM DATE INVOICE DATE CODE ORIG INV CREDITED
REASON AMOUNT AMOUNT
XX-XXXX-00000-12345-RENEW-00000 CANCELLATION 203790 X-XXXXXXXXXXX Sam AAAAAAAAAAA XXXXXXXX 30-May-18 21-May-18 USD 45.99 0.00
XX-XXXX-00000-12345-RENEW-00000 CANCELLATION 203791 X-XXXXXXXXXXX John ddddddd XXXXXXXX 31-May-18 30-May-18 USD 152.50 0.00
XX-XXXX-10000-21110-XXXXX-00000 CANCELLATION 203791 X-XXXXXXXXXXX John EEEEE XXXXXXXX 31-May-18 30-May-18 USD 152.50 0.00
XX-XXXX-10000-21110-XXXXX-00000 CANCELLATION 203791 X-XXXXXXXXXXX John EEEEE XXXXXXXX 31-May-18 30-May-18 USD 152.50 0.00
but only issue is some rows are not aligned as others. I have attached text file and sample excel file that it should look like after conversion.
Text file -
IEEE Credit Memo Register
30-JUN-18 18:17
IEEE Service Center Trx Date From: 27-MAY-2018 To: 30-JUN-2018 Page: 1
Invoice Credit Memo Invoice Orig. Invoice Amount
Credit Memo # Credited Customer Name Customer # Date Date Code Amount Credited
-------------- ----------------- ---------------------------- ------------ ----------- ----------- ----- -------------- --------------
Reason: CANCELLATION
Product #: ----- GL Account #: XX-XXXX-00000-12345-RENEW-00000
203790 X-XXXXXXXXXXX Sam AAAAAAAAAAA XXXXXXXX 30-MAY-18 21-MAY-18 USD 45.99 0.00
203791 X-XXXXXXXXXXX John ddddddd XXXXXXXX 31-MAY-18 30-MAY-18 USD 152.50 0.00
-----------------
Total Amount Credited By Product # / GL Account # 0.00
30-JUN-18 18:17
IEEE Service Center Trx Date From: 27-MAY-2018 To: 30-JUN-2018 Page: 2
Invoice Credit Memo Invoice Orig. Invoice Amount
Credit Memo # Credited Customer Name Customer # Date Date Code Amount Credited
-------------- ----------------- ---------------------------- ------------ ----------- ----------- ----- -------------- --------------
Product #: ----- GL Account #: XX-XXXX-10000-21110-XXXXX-00000
203791 X-XXXXXXXXXXX John EEEEE XXXXXXXX 31-MAY-18 30-MAY-18 USD 152.50 0.00
203791 X-XXXXXXXXXXX John EEEEE XXXXXXXX 31-MAY-18 30-MAY-18 USD 152.50 0.00
-----------------
Total Amount Credited By Product # / GL Account # 36.30
Sample excel output that I need -
GL ACCOUNT NUMBER CREDIT MEMO CM NUMBER INVOICE CUSTOMER NAME CUSTOMER NO CM DATE INVOICE DATE CODE ORIG INV CREDITED
REASON AMOUNT AMOUNT
XX-XXXX-00000-12345-RENEW-00000 CANCELLATION 203790 X-XXXXXXXXXXX Sam AAAAAAAAAAA XXXXXXXX 30-May-18 21-May-18 USD 45.99 0.00
XX-XXXX-00000-12345-RENEW-00000 CANCELLATION 203791 X-XXXXXXXXXXX John ddddddd XXXXXXXX 31-May-18 30-May-18 USD 152.50 0.00
XX-XXXX-10000-21110-XXXXX-00000 CANCELLATION 203791 X-XXXXXXXXXXX John EEEEE XXXXXXXX 31-May-18 30-May-18 USD 152.50 0.00
XX-XXXX-10000-21110-XXXXX-00000 CANCELLATION 203791 X-XXXXXXXXXXX John EEEEE XXXXXXXX 31-May-18 30-May-18 USD 152.50 0.00