Discussion Locked

Fixed ASCII

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
What is the easiest way to convert a CSV file to a fixed length ascii? Is there a easy to use software program out there?

7 replies

by aline_bernstein

I don't know of a program that will do this automatically, but I would be happy to help you out as a one-shot deal if the file is not too complicated. I would probably either read it into Access or write a small script to do it. Feel free to contactme at aline_bernstein@yahoo.com if you like.

Aline

by jeng

The really easiest method would be to use a spreadsheet, database, or word processor application and import it in. Then export it back out as a fixed width record (if available), or, with the application, you can print to a file using a generic printer driver.

Or you can look into writing a small program (e.g. Perl, C, Pascal, QBASIC, etc.) to do the job. Depending on how complicated the data in the CSV is (i.e. commas in text, double quotes in text), you might need to do a combination of the two (application + program).

by estebandelatorre

CVS files are comma delimited and enclose quotes -> "My Name","My Phone"
What ever the lenght of this fields are, it's lenght will be the lenght of the string not the field. Fix lenght means , the same lenght for each field.
In order to conver them it would be prefereable to define the fix lenght fields into an access like database, import the cvs file into the database and then export them to fix lenght

This discussion is closed to new replies.