#1   Report Post  
Posted to microsoft.public.excel.misc
moonwalker
 
Posts: n/a
Default 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


--
moonwalker
------------------------------------------------------------------------
moonwalker's Profile: http://www.excelforum.com/member.php...o&userid=31766
View this thread: http://www.excelforum.com/showthread...hreadid=514918

  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
moonwalker
 
Posts: n/a
Default Tab Delimiter 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 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

  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Doug Kanter
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
moonwalker
 
Posts: n/a
Default Tab Delimiter File


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


--
moonwalker
------------------------------------------------------------------------
moonwalker's Profile: http://www.excelforum.com/member.php...o&userid=31766
View this thread: http://www.excelforum.com/showthread...hreadid=514918

  #7   Report Post  
Posted to microsoft.public.excel.misc
moonwalker
 
Posts: n/a
Default Tab Delimiter File


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


--
moonwalker
------------------------------------------------------------------------
moonwalker's Profile: http://www.excelforum.com/member.php...o&userid=31766
View this thread: http://www.excelforum.com/showthread...hreadid=514918

  #8   Report Post  
Posted to microsoft.public.excel.misc
moonwalker
 
Posts: n/a
Default Tab Delimiter File


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


--
moonwalker
------------------------------------------------------------------------
moonwalker's Profile: http://www.excelforum.com/member.php...o&userid=31766
View this thread: http://www.excelforum.com/showthread...hreadid=514918

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Weird File Open/Save As Behavior [email protected] Excel Discussion (Misc queries) 0 December 9th 05 02:26 AM
Excel file automatically opens Lost4Now Excel Discussion (Misc queries) 6 December 4th 05 09:35 PM
Links picking up values from an older version of linked file Cate Links and Linking in Excel 4 October 20th 05 01:53 PM
cannot open excel file, please help!!! sunlite Excel Discussion (Misc queries) 0 September 5th 05 05:29 PM
Locating a file in excel with a partial file name. Audra Excel Discussion (Misc queries) 0 February 19th 05 02:03 PM


All times are GMT +1. The time now is 05:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"