Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Importing text file without end-of-line delimiter?
In Excel, I recorded a macro while importing a text file (because that's the easiest way I've found to capture the fixed-width values for my fields). It imported just fine. Now I'm using VBA to import that same text file a line at a time and parse each line for data values. I was having trouble (after the first line, the code would quit). I used a msgbox to display that first line prior to parsing- and it showed me the whole file! (or as much as could fit in a msgbox, anyway). So somehow, on importing the text file via the menu (file/open), Excel knew that there were multiple lines and put the data in multiple rows. However, when I use: Do While Not EOF(1) Line Input #1, LineofText MsgBox LineofText Loop It opens the entire file as one line. Clearly I'm missing something here, but I'm not sure what. Any suggestions? Thank you, Keith |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Delimiter for csv and text file using ADO | Excel Programming | |||
Importing text file with no line delimiters | Excel Discussion (Misc queries) | |||
Need Help Importing Text File Using Two or More Spaces as the Delimiter | Excel Discussion (Misc queries) | |||
Need Help Importing Text File Using Two or More Spaces as the Delimiter | Excel Programming | |||
Adding a delimiter when importing a txt file | Excel Programming |