Text File Use LINQ Query Suggestion

Hi

I would like to to ask about the fastest way to process the text file that contain more than 20k lines.
example as below “Input File”

I need to do a summary and the output In excel format as below:

Total = Value before + sign

“OUTPUT”

Name Number Of transaction Total Date
ETIQA FAMILY TAKAFUL 4 1,525.1 April
TNBA 3 6,704.65 April

“Input File”

BEGINNING BALANCE 991,628.29
01/04 CMS - CR PYMT MARS 529.10+ 992,157.39
ETIQA FAMILY TAKAFUL
ETIQA CLAIM
6626337
01/04 CMS - CR PYMT MARS 6,751.63+ 998,909.02
EFTB - FAMILY TAKAFU
ETIQA CLAIM
6633982
01/04 CMS - CR PYMT MARS 242.00+ 999,151.02
ETIQA FAMILY TAKAFUL
ETIQA CLAIM
6556592
01/04 CMS - CR PYMT MARS 262.00+ 999,413.02
ETIQA FAMILY TAKAFUL
ETIQA CLAIM
6568745
01/04 CMS - CR PYMT MARS 492.00+ 999,905.02
ETIQA FAMILY TAKAFUL
ETIQA CLAIM
6613546
01/04 CMS - DR CORP CHG 78.00- 983,667.19
CMS - DRaa CORP CHG

01/04 CMS - CR PYMT MARS 5,336.65+ 989,003.84
PERMODALAN NASIONAL
2200003135
PYT FR PERMODALAN NA
02/04 TRANSFER TO A/C 199.00+ 989,202.84
EJ BAYU *
PCR TEST
Pcr test
02/04 CMS - CR PYMT MARS 177.55+ 989,380.39
ELIB A/C-DATARAN (PA
ETIQA CLAIM
6618588
02/04 CMS - CR PYMT MARS 1,232.00+ 990,612.39
ELIB A/C-DATARAN (PA
ETIQA CLAIM
6566508
02/04 CMS - CR PYMT MARS 757.00+ 991,369.39
ELIB A/C-DATARAN (PA
ETIQA CLAIM
6624097
02/04 TRANSFER TO A/C 136.00+ 991,505.39
TNBA
CLAIM

I can do this by insert each line in excel and do the query.

image

and the processing time to slow and I believe slow because I convert text to excel.
I need a advise on how to speed up the process to get the output e.g direct from Text file to output as per above

Thank you
Regards
Jamuri

Reply

Duplicate Of:

@Abang_Jamuri_Abang_Shoker is this format always static?

Also can you highlight the text to fetch in the text document?

In file.docx (45.2 KB)
Sample input(text file) and output as per word Doc

Hi Rahul,

This file format is static.
Please find word doc for the detail item that need to be fetch.

I did try to process around 800 lines in more than 8 minutes.

Regards