Results 1 to 7 of 7
  1. #1
    Star Lounger
    Join Date
    Oct 2002
    Location
    Sheffield, Yorkshire, England
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Export to csv file (2000)

    I am trying to export the results of a query to a csv file without a header row, delimited with commas and without text qualifiers. When I click finish in the export wizard I get "Invalid argument". What am I missing?
    Sample db is attached.

    Graham
    Attached Files Attached Files

  2. #2
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Export to csv file (2000)

    Hi, I'm running Access2000XP, and the export worked fine with the same settings you chose. Strange.

    Perhaps the wizard is corrupted? Are you right-clicking the query and choosing Export? This is what I did.
    Thanks,

    pmatz

  3. #3
    Star Lounger
    Join Date
    Oct 2002
    Location
    Sheffield, Yorkshire, England
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Export to csv file (2000)

    Hi,
    Yes - right click, choose export and select the options I need, but the export fails. How can I check if the wizard is corrupted?

    Graham

  4. #4
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Export to csv file (2000)

    You could try the Help / Detect and Repair...

    Other than that i'm sorry - not sure.
    Thanks,

    pmatz

  5. #5
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Export to csv file (2000)

    The problem may be associated with the format of the data in the tables.

    Go into your table and change the type from decimal to double and re-try the export. It should work.

    HTH
    Regards,

    Gary
    (It's been a while!)

  6. #6
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Export to csv file (2000)

    You may want to take look at this MSKB article, may explain reason export fails (number fields defined as Decimal) and some possible workarounds:

    ACC2000: "Invalid Argument" Error When You Export Data to a Text File

    Note - tested with db file you attached, when redefined fields as Double instead of Decimal, export succeeded, except it insisted on adding two decimal places to the number fields, even if formatted as text. Example:

    TWI,2004.00,5.00,22.00,14AA,308.00,0,782,872050.00 ,742177.00,375999.00
    TWI,2004.00,5.00,22.00,14AB,308.00,0,782,684500.00 ,844743.00,1141749.00

    If you don't want the superfluous decimal places, you may have to resort to some other method for creating text file, such as the archaic VB Print# or Write# statements used to write data to a text file (Print in this case, because Write automatically adds delimiters to text or date fields).

    HTH

  7. #7
    Star Lounger
    Join Date
    Oct 2002
    Location
    Sheffield, Yorkshire, England
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Export to csv file (2000)

    Thanks for the help.

    I can't change the data type to double as I'm importing the data from another db, but the Print# solution works.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •