Exporting to txt file

  • Thread starter Thread starter Rodolfo Fontes
  • Start date Start date
R

Rodolfo Fontes

Hi group,

How can I export a .xls document to a txt file, without tab separator? All
the xls data chould appear like
001045654
And all i got until now is
001 04 5654

Thanks for any help,
Rodolfo Fontes
 
Have you tried adjusting column width (using a fixed with font (courier new is
what I use)) and then saving it as a .prn file?

If you have and that doesn't work, maybe you could use a formula in a helper
cell:

=a1&b1&c1
or
=text(a1,"000")&text(b1,"00")&text(c1,"0000")

Then copy that formula down the range.

Copy that column and paste into Notepad and save from there.

=====

If all else fails, you could write your own macro to save the data.

Here are three sites that you could steal some code from:

Earl Kiosterud's Text Write program:
www.smokeylake.com/excel
(or directly: http://www.smokeylake.com/excel/text_write_program.htm)

Chip Pearson's:
http://www.cpearson.com/excel/imptext.htm

J.E. McGimpsey's:
http://www.mcgimpsey.com/excel/textfiles.html
 
Rudolfo,

There isn't a direct way to write a fixed-field text file in Excel. If
you're willing to go to some trouble, I've just added a workbook that will
prepare a mirror sheet of your sheet with fixed field sizes. I've added it
to my web site. www.smokeylake.com/excel. Go to "Text files and Excel,"
and read "Writing a text file from an Excel Sheet" "Fixed width." You can
download the workbook there. You'll also need the Text Write Program, also
at the site. The instructions are there. It's not thoroughly developed and
tested. Holler if you have problems.
 
Rodolfo,

It occurs to me that your data may already be in fixed field lengths. If
that's the case, skip the mirror workbook. Just use the Text Write Program
with the settings given in the article.

If your data fields don't have fixed lengths, you may have trouble with the
program that reads the file. All the cells of any column should have the
same count of characters.
 
Back
Top