Share via

Access export to CSV - formatting problem

Anonymous
2017-03-13T19:10:50+00:00

I have created a macro that exports a query from Access to a csv file.  Within the csv file, I need some of the columns to be formatted as "General" and some to be formatted as "Text".

Right now, every time I run the macro, all columns are formatted as "General".  Is there a way to set it up so I don't have to manually charge the formats for each column each time I run the macro?  

Thank you.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

6 answers

Sort by: Most helpful
  1. Anonymous
    2017-03-16T18:23:06+00:00

    That's what I was afraid of.  Thanks for letting me know.

    Was this answer helpful?

    0 comments No comments
  2. ScottGem 68,830 Reputation points Volunteer Moderator
    2017-03-16T11:51:29+00:00

    A CSV file is a plain text file. There is no formatting. Even if you select General and Text. Once it gets into the CSV its not formatted. When you import the CSV to something else, that's where you need to set formatting.

    Was this answer helpful?

    0 comments No comments
  3. Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
    2017-03-16T02:29:57+00:00

    I don't have A2007 in front of me, but in A2010 it is a button on the second step of the wizard.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2017-03-15T15:59:46+00:00

    Tom - thanks for the reply.  I'm still a relative newbie with Access...and I don't know how get to advanced options in the Export Wizard.  Any help would be appreciated.

    Was this answer helpful?

    0 comments No comments
  5. Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
    2017-03-14T04:53:53+00:00

    When you step through the export wizard, have you tried the advanced options which allow you to specify a format for each column, and save that ExportSpecification so you can re-use it later in your macro?

    Was this answer helpful?

    0 comments No comments