![]() |
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. |
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. |
All times are GMT +1. The time now is 12:30 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com