Export to cvs combining fixed width and delimiter

zeeforel

Registered User.
Local time
Today, 07:22
Joined
Aug 11, 2004
Messages
25
Hi to you all!

I have a question about exporting a table to a csv file where I need the combination of:
  • a fixed (variable per field) width per field AND
  • a "; " (semicolon) as a delimiter
Using Access 2016 is this even possible?

Many thanks in advance!
 
Hi. Not 100% sure but I am thinking maybe not. Otherwise, you might be able to create a query to insert the ";" in between each column, so you can then export the data using fixed width (size of 1 for the ;s). Just a thought...
 
a fixed (variable per field) width per field
Example??

What exactly does this mean? Seems theDBguy understands, but I'm confused.
 
Example??

What exactly does this mean? Seems theDBguy understands, but I'm confused.
I read it as creating an export spec to specify the width of each field.
 
Thanks for responding so quick! What I mean is this:
  • Field 1: width 6
  • Field 2: width 12
  • etc
and all fields separated by ";"

How can this be done? Many thanks!
 
Thanks for responding so quick! What I mean is this:
  • Field 1: width 6
  • Field 2: width 12
  • etc
and all fields separated by ";"

How can this be done? Many thanks!
Hi. Did you see my reply? I just gave it a try, and it seems to do what you wanted.
 
Yes, I did. But could you please give me a hint how to proceed? I do not have experience running VBA...

Thanks.
Has nothing to do with VBA. I just created a query based on a table. I added a ";" in between each column. Tried to export the query using fixed width, and it worked!
 
Here is what I found via Google.
Fixed format means that the fields in your file have a fixed length. For instance first column is always 10 characters, second is 3 characters and third is 20 characters.
Delimited format means that there is a character used to separate every column on each line. The most common format are CSV (Comma-separated values) or TSV (Tab-separated values) files.
So depending of how your data is structured in your source file, you need to choose fixed or delimited.

I like theDBguy's approach with the query.
 
Has nothing to do with VBA. I just created a query based on a table. I added a ";" in between each column. Tried to export the query using fixed width, and it worked!

A ha, now I understand! Takes a bit of work but it is a great suggestion. Thanks very mucht for this!
 
A ha, now I understand! Takes a bit of work but it is a great suggestion. Thanks very mucht for this!
Right. Otherwise, I am not sure there is a way to mix the two methods. Good luck!
 

Users who are viewing this thread

Back
Top Bottom