Access World Forums

Access World Forums (https://www.access-programmers.co.uk/forums/index.php)
-   Modules & VBA (https://www.access-programmers.co.uk/forums/forumdisplay.php?f=12)
-   -   TransferText .CSV format (https://www.access-programmers.co.uk/forums/showthread.php?t=274098)

Leo_Polla_Psemata 01-27-2015 02:10 PM

TransferText .CSV format
 
Hi ,
I have a simple query and I want to export it in excel, Coma Separated Value., .CSV

I tried to run DoCmd.TransferText but all of my attempts were futile.

Is there any idea about it ?

Thanks



Edit

I found it, I must export it as TXT and file suffix insert .csv instead of .txt and it works

Now, does anyone know if I can execute this "Saved Exports" through a macro or docmd ?



Another edit, i insert a picture just to make it more clear.
Can I run this "Saved Exports" through a macro or docmd ?
http://s16.postimg.org/fhfuqxm5d/Untitled.jpg
[img=http://s16.postimg.org/fhfuqxm5d/Untitled.jpg]

gemma-the-husky 01-28-2015 03:44 AM

Re: TransferText .CSV format
 
that isn't right.

you can export either as fixed width, or as comma separated. you can give the resulting file any name you like.

the various arguments in the docmd.transfertext command specify how the resultant file is structured. you can use a specification file instead if you prefer.

In your code (eg as a result of a button click)
docmd.transfertext etc

Leo_Polla_Psemata 01-28-2015 12:32 PM

Re: TransferText .CSV format
 
The problem is that the "specification file" does not include field name on first row.

gemma-the-husky 01-28-2015 05:29 PM

Re: TransferText .CSV format
 
there is a check box for that on the specification.

Leo_Polla_Psemata 01-29-2015 03:12 AM

Re: TransferText .CSV format
 
The check box, yes, but it doesn't keep the field name in the specifications and the csv is without field name on first row

http://s4.postimg.org/j6onw968d/Northwinsd.jpg


All times are GMT -8. The time now is 10:48 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World