Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 01-27-2015, 02:10 PM   #1
Leo_Polla_Psemata
Newly Registered User
 
Join Date: Mar 2014
Posts: 187
Thanks: 41
Thanked 0 Times in 0 Posts
Leo_Polla_Psemata is on a distinguished road
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 ?

[img=http://s16.postimg.org/fhfuqxm5d/Untitled.jpg]


Last edited by Leo_Polla_Psemata; 01-27-2015 at 03:06 PM.
Leo_Polla_Psemata is offline   Reply With Quote
Old 01-28-2015, 03:44 AM   #2
gemma-the-husky
Super Moderator
 
gemma-the-husky's Avatar
 
Join Date: Sep 2006
Location: UK
Posts: 13,791
Thanks: 55
Thanked 1,027 Times in 993 Posts
gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all
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
__________________
Dave (Male!)
Gemma was my dog

if a poster helps you, please click the scales at the bottom left of this posting, or use the thanks button alongside.
gemma-the-husky is offline   Reply With Quote
Old 01-28-2015, 12:32 PM   #3
Leo_Polla_Psemata
Newly Registered User
 
Join Date: Mar 2014
Posts: 187
Thanks: 41
Thanked 0 Times in 0 Posts
Leo_Polla_Psemata is on a distinguished road
Re: TransferText .CSV format

The problem is that the "specification file" does not include field name on first row.

Leo_Polla_Psemata is offline   Reply With Quote
Old 01-28-2015, 05:29 PM   #4
gemma-the-husky
Super Moderator
 
gemma-the-husky's Avatar
 
Join Date: Sep 2006
Location: UK
Posts: 13,791
Thanks: 55
Thanked 1,027 Times in 993 Posts
gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all
Re: TransferText .CSV format

there is a check box for that on the specification.
__________________
Dave (Male!)
Gemma was my dog

if a poster helps you, please click the scales at the bottom left of this posting, or use the thanks button alongside.
gemma-the-husky is offline   Reply With Quote
The Following User Says Thank You to gemma-the-husky For This Useful Post:
Leo_Polla_Psemata (01-29-2015)
Old 01-29-2015, 03:12 AM   #5
Leo_Polla_Psemata
Newly Registered User
 
Join Date: Mar 2014
Posts: 187
Thanks: 41
Thanked 0 Times in 0 Posts
Leo_Polla_Psemata is on a distinguished road
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


Leo_Polla_Psemata is offline   Reply With Quote
Reply

Tags
csv , transfertext

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
TransferText , date and time format Leo_Polla_Psemata Modules & VBA 3 01-25-2015 09:27 AM
docmd.transfertext opens csv with improper format Zach Lau Modules & VBA 3 03-19-2013 08:03 PM
Date format with TransferText RichO Modules & VBA 4 02-12-2012 10:37 AM
when I use TransferText from Access table to .txt file, data format is changed lhanes72 Macros 9 01-20-2011 10:57 AM
TransferText PearlGI Modules & VBA 5 07-23-2002 08:40 AM




All times are GMT -8. The time now is 12:40 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


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