Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
I'm trying to define a record layout for a CSV (variable-length) file. I've read the help documentation and played with the layout editor but can't figure out how to make it work.
I understand that you've built a sister product reCsvEditor, but I'd rather just use RecordEditor rather than have to install/learn another tool. That is, if RecordEditor will do what I need.
I just need to set up a record layout for a file that is pipe-delimited and includes the column/field names in the first row/record in the file.
I'm using MSaccess_bu_090.
After selecting Record Type = Delimited Fields, I see the two tabs: Fields and Extras.
Under Fields tab, I don't define anything.
Under Extras tab, I populate the settings as follows:
Parser: Basic Parser
Record Separator: [default]
File Structure: Csv Name on 1st line
But when I open the file using this record layout, none of the data gets mapped to the columns/fields.
What am I missing?
The easiest way to define a new CSV file using | as a seperator is to Edit
an Existing lay say Comma Delimited, names on the first line, do a save-as
then change the delimiter to |,
For the Fields tab, you do need to define one Char Field
(I will look at removing that requirement). From memory the field is a template
for the generated fields, so If you defined it as numeric (say Numeric any Decimal)
All fields would get that type (its been a long time since I looked at this,
so I could be wrong).
On the Extra Screen, If you are reading the Field names from the First line of the File,
you must set the File Structure to Csv Name of First line.
See attached zip file of the screens
A couple of other points
* There is the Generic Csv layout that will read the file and let you choose the delimiter
* It is possible to define complicated Csv File structures if you need.
- If you had a delimited-file without Column-Headings, you would need to define
the fields. You can define types other than Char if you want (avoid binary types though).
You also need to use a File-Structure of default (or Text-Io etc).
There is the type Csv Array for when when a Csv-Structure is embedded in a Csv-Field i.e.
field 1, array-item1;array-item2;array-item3; field 3
I this case the 2nd fields is a delimiter
It seems to work now! Thanks, Bruce