Read a text file with 3 fields for line

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
rba88usa
Newbie
Posts: 5
Joined: Mon Apr 03, 2017 7:33 pm

Read a text file with 3 fields for line

Post by rba88usa » Wed Feb 07, 2018 8:20 pm

I have a file that contains 3 fields in every line separated by a coma, and I need to read the first field and then put on the web form, then come back to the file and read the next field on the same line and do the same, and return for the last time and grab the third field on the line and do the same, then go to line 2 and do the same over and over until EOF. Here is a sample of the file.

12345,3434,33333
34557,9898,87878
43409,3349,93753

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Read a text file with 3 fields for line

Post by Marcus Tettmar » Mon Feb 12, 2018 9:42 am

Can you not use CSVFileToArray?

Alternatively use ReadFile and then use the Separate command to split on CRLF. Loop through that array and for each entry use Separate again and split on COMMA.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts