LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default How do I export data in text format with minimum of spaces?

The following macro exports a specified portion of Excel file as
a .prn:

Sub ExportA1()

Sheets("A1").Select
ActiveWindow.SmallScroll Down:=-3
Range("D321:AR350").Select
Selection.Copy
Sheets.Add
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveWorkbook.SaveAs Filename:= _
"Detail.prn", FileFormat:=xlTextPrinter, CreateBackup:=False
End Sub

The output looks more or less like this:

SKU 01 0 570511455 2 1
2.49 2.49
SKU 01 0 570511455 2 1
14.99 -1.50 13.49

Whereas I want it to look like this:

SKU 01 0 570511455 2 1 2.49 2.49
SKU 01 0 570511455 2 1 14.99 -1.50 13.49

Does SaveAs have a parameter which would compress any sequence of
spaces into one space?

 
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
Custom Format alphanumberic value with spaces Bruce Excel Worksheet Functions 2 November 28th 05 12:04 PM
Can I retrieve a value and its format using the minimum function? daled Excel Worksheet Functions 1 November 2nd 05 09:38 PM
Conditional format of minimum number MaggieMagill Excel Worksheet Functions 6 September 25th 05 11:36 PM
Can Excel Export Data to Word Format? Reddiance Excel Discussion (Misc queries) 2 April 18th 05 06:03 PM
Empty Cells, Spaces, Cond Format? Ken Excel Discussion (Misc queries) 3 December 4th 04 04:47 PM


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