Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default How do I save a 689 character fixed field/record format file

Need to save a file in a fixed length format for import into another
application. Need to know how to do this in Excel and not wrap the records
as I am experiencing using PRN format.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default How do I save a 689 character fixed field/record format file

You can use the formula:

=TEXT(Sheet1!A1,"000000.000")

as an example to convert a numeric value from A1 in Sheet1 into a
fixed length string of 6-digit integer values (with leading zeros if
required) and 3 decimal places after the point (10 characters in all).
Just change the format string to adjust for other requirements. You
can also use this for dates.

You can use the REPT function to add leading or trailing spaces to a
text value to make it a fixed number of characters, by taking account
of the LENgth of the string and adding sufficient spaces to make it up
to your fixed length.

If you do this in a second sheet and copy the formulae down, then you
can convert your variable length records in Sheet1 to fixed length in
Sheet2. You can fix the values in the second sheet (and delete the
first sheet if necessary). Using File | Save As you can choose the
file type, eg .csv or .txt.

Hope this helps.

Pete

On Jul 23, 12:07*am, Mike wrote:
Need to save a file in a fixed length format for import into another
application. *Need to know how to do this in Excel and not wrap the records
as I am experiencing using *PRN format.


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
A fixed field format needs fronting zeroes for each cells value. CommerceMary Excel Worksheet Functions 8 July 25th 07 08:44 PM
Save Excel file with certain columns with fixed width Vijay Kotian Excel Discussion (Misc queries) 3 March 13th 07 01:48 PM
how do i save an excel file as a non-delimited, non-packed fixed jthisdell Excel Discussion (Misc queries) 1 August 29th 06 01:27 PM
how to tell excel to read numeric field as character fr a csv file Ang Kah Huat Excel Discussion (Misc queries) 3 January 11th 06 11:08 AM
Export file to CSV delimited with fixed field length Plucky Duck Excel Discussion (Misc queries) 2 May 28th 05 11:01 PM


All times are GMT +1. The time now is 03:00 AM.

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"