Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Pal Pal is offline
external usenet poster
 
Posts: 2
Default Single Space in PRN

Hi,

I've written a macro (Excel 2003) to reformat an input file. It's all
going well but the output must be in a space delimited format with only
a SINGLE space between the 2 columns. The problem is that Excel insists
on putting in 5 spaces.


Is there a way to trim the extra spaces down to 1?

Cheers,

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Single Space in PRN

If your macro saves the file as .prn (space delimited), then you'll have to do
more.

You can try looking at the way others do it:

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



Pal wrote:

Hi,

I've written a macro (Excel 2003) to reformat an input file. It's all
going well but the output must be in a space delimited format with only
a SINGLE space between the 2 columns. The problem is that Excel insists
on putting in 5 spaces.

Is there a way to trim the extra spaces down to 1?

Cheers,


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
Pal Pal is offline
external usenet poster
 
Posts: 2
Default Single Space in PRN

Thanks for the excellent resources, Dave. I see that I'll have to write
the file line-by-line. Not a problem, thanks again for the trick.

Dave Peterson wrote:
If your macro saves the file as .prn (space delimited), then you'll have to do
more.

You can try looking at the way others do it:

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



Pal wrote:

Hi,

I've written a macro (Excel 2003) to reformat an input file. It's all
going well but the output must be in a space delimited format with only
a SINGLE space between the 2 columns. The problem is that Excel insists
on putting in 5 spaces.

Is there a way to trim the extra spaces down to 1?

Cheers,


--

Dave Peterson


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Single Space in PRN

You may just want to try Earl's program. He has lots of options--including the
ability to specify the delimiter character (if I recall correctly).

(You may be done if you use Earl's program <bg.)

Pal wrote:

Thanks for the excellent resources, Dave. I see that I'll have to write
the file line-by-line. Not a problem, thanks again for the trick.

Dave Peterson wrote:
If your macro saves the file as .prn (space delimited), then you'll have to do
more.

You can try looking at the way others do it:

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



Pal wrote:

Hi,

I've written a macro (Excel 2003) to reformat an input file. It's all
going well but the output must be in a space delimited format with only
a SINGLE space between the 2 columns. The problem is that Excel insists
on putting in 5 spaces.

Is there a way to trim the extra spaces down to 1?

Cheers,


--

Dave Peterson


--

Dave Peterson
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
single space Tina B New Users to Excel 2 November 9th 09 10:52 AM
removing a single space in a cell birdsting Excel Discussion (Misc queries) 4 May 10th 09 05:02 AM
how do I make a multiple columns in a single space? (press enter Will Excel Discussion (Misc queries) 1 November 12th 06 05:02 AM
Paper Space / Model Space ? Coolboy55 Excel Discussion (Misc queries) 0 September 1st 05 08:58 PM
Single space? - help Adam[_7_] Excel Programming 3 August 5th 03 11:50 PM


All times are GMT +1. The time now is 12:59 AM.

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

About Us

"It's about Microsoft Excel"