Copying from excel to txt + formatting.

  • Thread starter Shekhar Thakurdesai
  • Start date
S

Shekhar Thakurdesai

I have to copy an excel file into a txt file.
But when i copy paste columns(data) from excel and paste it in notepad
I get tab's between the two columns data.I need it to be a space.

eg.when i copy 2|3|4 (data in columns 2,3,4)
i get 2 3 4 (with tabs in between)
i need it to be 2 3 4.(with a single space in between numbers)

Could some one help me out with a fast way to do it.
 
D

Dave Peterson

You could shrink your column widths and file|saveas and choose:
formatted text (space delimited) (*.prn)

(I change my fonts to Courier New (non-proportional) just so I can see if it's
close when I start.)

You could use a helper column:

=a1&" "&b1&" "&c1&" "&d1
copy down the column
then copy those cells and paste into Notepad and save from there.

Or you could use a macro.

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

(You may be happy with Earl's version--right out of the box!)
 

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