export .csv with fixed width fields

  • Thread starter Thread starter Clanure
  • Start date Start date
C

Clanure

Guest
Hello all,

I'm trying to export a table to .csv file, but I want fields with null values to be padded with spaces. ie. if the field length is 50, but there is a null value, I want all 50 spaces.

Anybody know if this is possible?

Thanks,

Clanure
 
Create a query and use the Format() function to fix the lengths. You can export the query. Why are you doing this though? Normally delimited files have variable length fields. If you want fixed width fields it is easier to export using the fixed option.
 
Thanks for the info, and the file is being created to accommodate some off the shelf software that wants .csv. The problem is that if the field is null, then it gives this field a length of 1 when creating the template file. So the next time we use the template file, and the field isn't null, it crashes the template because they don't match.

Thanks for the tip. I'll give it a try.

Clanure
 

Users who are viewing this thread

Back
Top Bottom