how can I save a file with a single space delimeter

S

speedy

I need to save a fixed record length file that has a single space between
each field is there any way this can be done?
 
D

Dave Peterson

If you're very good, you can save your file as:
"Formatted Text (Space delimited)(*.prn)"
(under the save as Type box on the file|SaveAs dialog.)

I like to change my font to Courier New and adjust columnwidths. Then check my
output in my favorite text editor. (It's easy to screw up when adjusting the
columnwidth.)

But what you wrote would imply that each field is already the same length--and
contains no spaces?

I'm not sure what happens when you have a field that varies in length--do you
keep only one space as the delimiter or do you keep it fixed width?
 
M

Myrna Larson

Fixed-record length files have, as the name says, a fixed length for each
record. They also have a fixed length for each field (column). If the data in
the column is too short, it's padded with spaces. If too long, it's truncated.
This type of file does use a delimiters in the strict sense of the word. A
field begins at a certain position in the record, say position 27, and it's,
say 10 characters long. i.e. characters 27-36 represent this field. No spaces
are needed at all. If all fields are the the specified length, the file would
contain no spaces at all (other than embedded spaces in a text field).

I guess "Speedy" is after the equivalent of a CSV file, but with a space
between fields instead of a comma. Excel can't do that automatically. You'd
have to write the VBA code yourself.
 
M

Myrna Larson

Typo. Should have said "does not use a delimiter in the strict sense of the
word".
 
D

Dave Peterson

The other option that Speedy could be looking for is a fixed width file with an
extra space between each field.

Sometimes those additional "delimiters" are used more for readability by
humans--not programs.

But I was confused enough by the post to try to get clarification from Speedy.
 
Top