Results 1 to 2 of 2
  1. #1
    torican is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2011
    Posts
    1

    Angry Export Access Tables to Excel then save another sheet to csv

    Hi everyone.

    Please help an access n00b.

    I have created an access database to automate our trademe retail feed. (New Zealands alternative to ebay - retail feed updates our listings from a csv dump)

    My database pulls data out of our inventory software and holds tables with auction/global data.

    What I need to do is create a button in access to copy said tables to excel sheets (overwriting existing data), then save a separate sheet as CSV in the format of "retailfeed_DDMMYYYY_HHMM.csv.



    I have tried and succeded in coping data to excel sheet using script like:

    Code:
    Application.DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Shipping", "C:\temp\testBook1.xls", False, "Shipping"
    But I am now stuck in how to save an output sheet to csv (after my workings).

    I can't find/figure out how to do it from access. I have tried creating a macro to do it in excel but keeps giving me errors.

    I have also tried it in reverse... Using the access button to run a macro in excel to do the import then save but then I just get errors the database is open.

    Any help will be really appreciated. I have only spent a few days ripping my hair out in google!!!

  2. #2
    Join Date
    Apr 2011
    Posts
    18
    First you must ran the export once manually, and save the export specification. Then you can use:
    Code:
    docmd.TransferText acExportDelim,"SpecName","myTableName","c:\Files\myfileName.csv"
    Where specName is the name of the export specificaiton you just saved.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 03-02-2011, 03:08 PM
  2. Access date export to excel
    By jituknows in forum Access
    Replies: 1
    Last Post: 02-05-2011, 01:32 PM
  3. Importing full excel sheet to access
    By karakal in forum Import/Export Data
    Replies: 0
    Last Post: 03-22-2010, 03:48 PM
  4. Access export to Excel
    By Rick West in forum Import/Export Data
    Replies: 4
    Last Post: 01-09-2010, 03:40 PM
  5. Importing Excel Sheet into Access dbase
    By tonystowe in forum Import/Export Data
    Replies: 0
    Last Post: 12-08-2006, 11:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums