Tab Delimiter File

  • Thread starter Thread starter moonwalker
  • Start date Start date
M

moonwalker

Hi guys,

I have this text file which is tab delimited.

The sample of the text file goes like this..


aaaa bbbb cccc dddd eeee

It looks fine..
i wrote a script to create a new worksheet in a excel..
but it turns out to be this in the worksheet

aaaa bbbb cccc dddd
eeee

any idea what is wrong?
i suspect the text file has a line feed after "dddd' that is causin
the proble
 
I'd open that text file in a text editor and verify what you believe.

Depending on what you find, you may have to just bite the bullet and fix the
text file.
 
ok..i think narrowing down the problem now

the text file looks like

aaa bbb ccc dddd

when i drag the text file to excel it opens up nicely

but when i use the Text Import Wizard set the delimiters and othe
stuff, the worksheet became

aaa bbb ccc
ddd

any ideas
 
Use a different text editor and find out what's in that text file.

I use a program called UltraEdit. It allows me to look at the text file in hex.
 
I've run into files like that, and sometimes, I find more success by
choosing Fixed Width and adjusting the vertical separation lines manually.
I've never recorded a macro while doing this, to see if the macro can be
fine-tuned and made permanent, but it might worth a try.
 
i think let me rephrase the question again..

when i drag and drop the txt file into excel
it opens up nicely..

aaaa bbbb cccc dd
dd

the column dd has a carriage return.

when i use the wizard to open the txt file

it open as

aaaa bbbb cccc dd
dd

actually im writing a script to automate of exporting tab seperated
delimiter file to a excel file and vice versa.

i hope some kind soul here can really help me..
thanks
 
i think let me rephrase the question again..

when i drag and drop the txt file into excel
it opens up nicely as a single row..

aaaa bbbb cccc dd
dd

the column dd has a carriage return.

when i use the wizard to open the txt file

it open as

aaaa bbbb cccc dd
dd

it becomes two rows

actually im writing a script to automate of exporting tab seperate
delimiter file to a excel file and vice versa.

i hope some kind soul here can really help me..
thank
 
i narrowing this problem down..

i guess i just need to go through every columns and make sure an
replace carriage return with empty string

can anyone guide me?
rather new to vbscript

thank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top