Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need some guidance on how to handle a multi-line text file import to
excel. I have a multi-line text file i am attempting to parse into Excel2003. Here is an example of the file: <rlnrp:cell=all; NEIGHBOUR RELATION DATA CELL WA32300 CELLR DIR CAND CS WA31340 MUTUAL BOTH NO KHYST KOFFSETP KOFFSETN LHYST LOFFSETP LOFFSETN 3 0 3 0 TRHYST TROFFSETP TROFFSETN AWOFFSET BQOFFSET 2 0 5 3 HIHYST LOHYST OFFSETP OFFSETN BQOFFSETAFR 5 3 0 3 CELLR DIR CAND CS WA30780 MUTUAL BOTH NO KHYST KOFFSETP KOFFSETN LHYST LOFFSETP LOFFSETN 3 0 3 0 TRHYST TROFFSETP TROFFSETN AWOFFSET BQOFFSET 2 0 5 3 HIHYST LOHYST OFFSETP OFFSETN BQOFFSETAFR 5 3 0 3 CELL WA30433 CELLR DIR CAND CS WA31960 MUTUAL BOTH NO KHYST KOFFSETP KOFFSETN LHYST LOFFSETP LOFFSETN 3 0 3 0 TRHYST TROFFSETP TROFFSETN AWOFFSET BQOFFSET 2 0 5 3 HIHYST LOHYST OFFSETP OFFSETN BQOFFSETAFR 5 3 0 3 END --------------------------------------------------------------- Details of where i am trying to go with this: The format of the source file is not modifiable so i am left to deal with it as is. I had created a macro to handle the basic import a space delimited and then another macro to sort it the way i wanted. This worked until the text file exceeded 65000 lines in excel. Now it has become an issue. What i ultimately need to achieve is a way to define a Start and Stop where all data between Start and Stop is read in as 1 line. It would identify CELL as the Start and read in to 1 line until it comes across CELL (Stop) again. Then continues on. I just need the CELL and CELLR data. Thus looking like so: CELL CELLR WA32300 WA31340 WA30780 WA30433 WA31960 ......and so on down the file. So, either some sort of Start and Stop trigger to define when to start writing a new line into Excel or a means of sending a string to a specific range (column) within Excel. So, any help or guidance you can offer will be much appreciated. Thank you |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Multi Line text box | Excel Discussion (Misc queries) | |||
Text File Import leaves a blank row after each line | Setting up and Configuration of Excel | |||
Saving multi-tab excel file created from comma delimited text file | Excel Programming | |||
copy/paste excel to texteditor -> multi-line text cells gain unwanted double-quotes | Excel Discussion (Misc queries) | |||
import huge text file line-by-line? | Excel Programming |