+ Reply to Thread
Results 1 to 8 of 8

Tab Delimiter File

  1. #1
    Registered User
    Join Date
    02-21-2006
    Posts
    15

    Tab Delimiter File

    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 causing the problem

  2. #2
    Dave Peterson
    Guest

    Re: Tab Delimiter File

    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.

    moonwalker wrote:
    >
    > 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 causing
    > the problem
    >
    > --
    > moonwalker
    > ------------------------------------------------------------------------
    > moonwalker's Profile: http://www.excelforum.com/member.php...o&userid=31766
    > View this thread: http://www.excelforum.com/showthread...hreadid=514918


    --

    Dave Peterson

  3. #3
    Registered User
    Join Date
    02-21-2006
    Posts
    15
    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 other stuff, the worksheet became

    aaa bbb ccc
    ddd

    any ideas?

  4. #4
    Dave Peterson
    Guest

    Re: Tab Delimiter File

    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.

    moonwalker wrote:
    >
    > 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 other
    > stuff, the worksheet became
    >
    > aaa bbb ccc
    > ddd
    >
    > any ideas?
    >
    > --
    > moonwalker
    > ------------------------------------------------------------------------
    > moonwalker's Profile: http://www.excelforum.com/member.php...o&userid=31766
    > View this thread: http://www.excelforum.com/showthread...hreadid=514918


    --

    Dave Peterson

  5. #5
    Doug Kanter
    Guest

    Re: Tab Delimiter File

    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.



  6. #6
    Registered User
    Join Date
    02-21-2006
    Posts
    15

    Carriage return in columns

    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

  7. #7
    Registered User
    Join Date
    02-21-2006
    Posts
    15

    Carriage return in columns

    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 seperated delimiter file to a excel file and vice versa.

    i hope some kind soul here can really help me..
    thanks

  8. #8
    Registered User
    Join Date
    02-21-2006
    Posts
    15
    i narrowing this problem down..

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

    can anyone guide me?
    rather new to vbscript

    thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1