S
SteveInBeloit
Hello,
Kind of struggling here. I need to read in a text file that contains prices
from a vendor. It is a formatted text file, so the first line is a heading,
second line spaces, third line heading, fourth line all dashes, then the
good stuff.
Each of the next lines have upc, date, old price, new price...
From reading, I thought this may work. Really hokey how I did the first
four lines, but don't know what to do:
Open "c:\pfms.txt" For Input As #1
Input #1, srtLine
Input #1, strLIne
Input #1, strLIne
Input #1, strLIne
Do While Not EOF(1)
Input #1, str1, str2, str3, str4, str5
Loop
Close #1
I have acouple of problems. When it starts reading the fifth line on, I get
the entire line in each variable. I don't know how to tell it they are
separate fields. It is formatted like a normal report, not csv.
Second, it reads passed the end of file.
Open to how to do this, or better options.
Thanks
Kind of struggling here. I need to read in a text file that contains prices
from a vendor. It is a formatted text file, so the first line is a heading,
second line spaces, third line heading, fourth line all dashes, then the
good stuff.
Each of the next lines have upc, date, old price, new price...
From reading, I thought this may work. Really hokey how I did the first
four lines, but don't know what to do:
Open "c:\pfms.txt" For Input As #1
Input #1, srtLine
Input #1, strLIne
Input #1, strLIne
Input #1, strLIne
Do While Not EOF(1)
Input #1, str1, str2, str3, str4, str5
Loop
Close #1
I have acouple of problems. When it starts reading the fifth line on, I get
the entire line in each variable. I don't know how to tell it they are
separate fields. It is formatted like a normal report, not csv.
Second, it reads passed the end of file.
Open to how to do this, or better options.
Thanks