Senin, 19 November 2018

[MS_AccessPros] Exporting data to a csv file

 

Hi Everyone

I needed to export the contents of a table to a csv file.  Not too difficult once I found DoCmd.TransferText.  However, when I first used TransferText it created double quotes around each text field - which caused problems to the receiving software.  I then found out that you can create an output specification that removes the double quotes and that spec is saved somewhere in the database (exactly where is really my question).


When I created another copy of the database for testing purposes, I found that the csv spec had not been copied across.  I had to start from scratch again and create the csv spec manually using :


Select table, Export to Text file, change the type from .txt to .csv, OK, click Advanced button.

In the Export Specification pop up window, change the Text Qualifier to {none}.

Choose Save As... to save the specification format.


The vba code I'm using is

DoCmd.TransferText acExportDelim, "CSV_Specification", "tempXeroMthlyTransfer", strOutputFilename, 1


My question is where is my manual CSV_Specification stored and can I easily copy it other databases?


Many thanks for your ideas.

Best regards

Ray

__._,_.___

Posted by: rayfrew@gmail.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


SPONSORED LINKS
.

__,_._,___

Tidak ada komentar:

Posting Komentar