Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Ttown
 
Posts: n/a
Default Last Column(=spaces) is Dropped When Importing from .Txt file

I am importing a text file from the mainframe in which the last
field of the record is spaces. After transfer of the file down to my
PC as a text file, I then wish to import it into Excel.
Excel is truncating the last column and wiping out my record length
which needs to be a fixed record length. After user corrections,
the Excel file will then be formatted back to text and processed
by another PC application. Any suggestions on how to prevent
the truncation of the last column of my records?
Thanks!

  #2   Report Post  
bj
 
Posts: n/a
Default

If the last column is always the same number of spaces you could set it as
=rept(" ",9) or however many spaces you need
if it is variable but you can calcualte however many you need by the other
cells
try something like
=rept(" ",50-len(A1)-Len(B1)-len(c1)) etc.

"Ttown" wrote:

I am importing a text file from the mainframe in which the last
field of the record is spaces. After transfer of the file down to my
PC as a text file, I then wish to import it into Excel.
Excel is truncating the last column and wiping out my record length
which needs to be a fixed record length. After user corrections,
the Excel file will then be formatted back to text and processed
by another PC application. Any suggestions on how to prevent
the truncation of the last column of my records?
Thanks!

  #3   Report Post  
Ttown
 
Posts: n/a
Default

Thanks for your reply,
but I forgot to say that this last column MAY contain spaces.
It does this time, but may not always.

"bj" wrote:

If the last column is always the same number of spaces you could set it as
=rept(" ",9) or however many spaces you need
if it is variable but you can calcualte however many you need by the other
cells
try something like
=rept(" ",50-len(A1)-Len(B1)-len(c1)) etc.

"Ttown" wrote:

I am importing a text file from the mainframe in which the last
field of the record is spaces. After transfer of the file down to my
PC as a text file, I then wish to import it into Excel.
Excel is truncating the last column and wiping out my record length
which needs to be a fixed record length. After user corrections,
the Excel file will then be formatted back to text and processed
by another PC application. Any suggestions on how to prevent
the truncation of the last column of my records?
Thanks!

  #4   Report Post  
bj
 
Posts: n/a
Default

when you generate the data to go back,
do a len() function ad use the rpt function to make sure you have enough
spaces.

"Ttown" wrote:

Thanks for your reply,
but I forgot to say that this last column MAY contain spaces.
It does this time, but may not always.

"bj" wrote:

If the last column is always the same number of spaces you could set it as
=rept(" ",9) or however many spaces you need
if it is variable but you can calcualte however many you need by the other
cells
try something like
=rept(" ",50-len(A1)-Len(B1)-len(c1)) etc.

"Ttown" wrote:

I am importing a text file from the mainframe in which the last
field of the record is spaces. After transfer of the file down to my
PC as a text file, I then wish to import it into Excel.
Excel is truncating the last column and wiping out my record length
which needs to be a fixed record length. After user corrections,
the Excel file will then be formatted back to text and processed
by another PC application. Any suggestions on how to prevent
the truncation of the last column of my records?
Thanks!

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
Importing Data from an Access Database Including a Hyperlink Colum B.C.Lioness Excel Discussion (Misc queries) 0 May 16th 05 05:26 PM
Importing Text Files smith_gw Excel Discussion (Misc queries) 1 May 5th 05 10:42 PM
How do I ignore newline character/carriage return while importing Achal Excel Discussion (Misc queries) 6 March 24th 05 02:24 AM
Importing text files with mathematical characters The Beckster Excel Discussion (Misc queries) 1 March 2nd 05 12:56 PM
importing excel spreadsheets into web-based applications Jim Excel Discussion (Misc queries) 0 February 22nd 05 04:43 PM


All times are GMT +1. The time now is 03:57 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"