Last Column(=spaces) is Dropped When Importing from .Txt file

G

Guest

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!
 
G

Guest

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.
 
G

Guest

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

Guest

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

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

Top