View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default Parsing a string

Sounds like a "table" created by using spaces in a plain text document. If
that's the case, I have a macro I use in Word that allows me to select the
"plain text table" and make it into a Word table. This can then be copied
directly in Excel. Would this help?

Ed

"simonc" wrote in message
...
I am reading lines of a text file, which has values in many columns, and
dividing these into their elements by writing them one by one in a cell in
a
worksheet and using texttocolumns with space as the delimiter and treating
consecutive delimiters as one. I don't need the values in the worksheet,
and
once I've extracted the particular elements I need I write these to
another
text file.

This seems to take a while so I wondered if there was a quicker way of
doing
it in code, without using a worksheet. There is the split function, but I
can't find a way of getting it to treat consecutive spaces as a single
delimiter. Is there a way?

I am using Excel 2000.

Grateful for any ideas.