Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
ascii save
 
Posts: n/a
Default save an excel file in fixed length records whose fields are blank

I need to save the data in ascii format including fields that are fixed
length and have spaces in them. I have tried every save as type. Each column
is formatted to the column width of that field (10cpi). For example a last
name may be smith but that field is 15 characters long.Excel puts either a
space or tab between fields but does not retain the spaces. please help
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

First, I'd change the font to a fixed width font--I use Courier New.

Then widen each column to what you want and save that file as a:
Formatted Text (Space delimited)(*.prn)

But those files have a 240 character per line limit.

Saved from a previous post:

There's a limit of 240 characters per line when you save as .prn files.

You have a few choices (try against a copy of your worksheet):

I'd either concatenate the cell values into another column:

=LEFT(A1&REPT(" ",5),5) & LEFT(B1&REPT(" ",4),4) & TEXT(C1,"000,000.00")

(You'll have to modify it to match what you want.)

Then I'd copy and paste to notepad and save from there. Once I figured out that
ugly formula, I kept it and just unhide that column when I wanted to export the
data.

If that doesn't work for you, maybe you could do it with a macro.

Here's a link that provides a macro:
http://google.com/groups?threadm=015...0a% 40phx.gbl

ascii save wrote:

I need to save the data in ascii format including fields that are fixed
length and have spaces in them. I have tried every save as type. Each column
is formatted to the column width of that field (10cpi). For example a last
name may be smith but that field is 15 characters long.Excel puts either a
space or tab between fields but does not retain the spaces. please help


--

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
Excel XP: File name in Title Bar not changed after Save As... Dominic Excel Discussion (Misc queries) 9 August 1st 05 12:58 PM
File close excel does not ask me to save changes Cathy Humphreys Excel Discussion (Misc queries) 2 June 13th 05 08:48 PM
VBA for Excel 2000 file is corrupt nkamp Excel Discussion (Misc queries) 0 May 26th 05 03:37 PM
How can I batch open a txt file in excel 2003 and save back as a . P Silzle Excel Discussion (Misc queries) 3 February 9th 05 11:44 PM
In Excel: If I know a file has 147,000 records, but Excel will on. Roy Lynn Excel Discussion (Misc queries) 9 January 12th 05 10:48 PM


All times are GMT +1. The time now is 05:31 PM.

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"