I am trying to automate a process where a particular type of text file goes through a data validation process.
So far I have managed to put the open the text file using file system objects and create a count output of x lines. But when i use EOF function to retrieve x - 1 lines it can't bring individual lines it thinks the whole data is one line.
I cannot by-pass this to perform further validation checks on this data. Any suggestions on how i go about in validation list of conditions on the dataset.
e.g. of a dataset:
AAA|E0071001|D|20090401010101|EC|UKDC|BP|PARTYID|1|TR01| CPD|AAA123|Test Participant A123|P|BBB456|New Participant B456|P| ER2|NAHNAH1|Test Participant|20090401|| EAD|7||| ZZZ|5|1562192240|
above appears as one line in the text file. If i extract into excel or work it splits into 5 rows as a expect, breaks by the space gaps for e.g. before CPD which becomes a line break.
using below:
Do While objTextfile.atendofstream <> True
objTextfile.skipline
c = c + 1
Loop
along with filesystemsobject i have managed to calculate #rows = 5.
but if i do the following:
For i = 1 To (NumLines - 1)
F.readline
text = text & F.readline
Next
strLine = F.readline
it only retrieves one line and doesn't split into 5 lines.
I also want to be able to analyse each input broken by delimiters, how would i go about doing this?