Results 1 to 2 of 2
  1. #1
    itm is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    69

    Question Trying to import a CSV file

    Hi,
    I have SQL code that would import an Excel file as follows:
    Code:
     Str = "SELECT [Ed_TEST$].* INTO [tblAct_Import_File] FROM [Ed_TEST$] IN '" & impFile & "' [Excel 8.0; HDR = YES;];"
         cn.Execute Str
    I do not want to use do not want to use "DoCmd.TransferSpreadsheet" I am finding do to rounding some figures are braught in a little off. However, I have found that if I use code, in the past, this sort of thing does not happen; but I canot remember how to do this. Can someone please tell me how this is done.


    Thank you
    itm

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    I have never seen this syntax before: [Excel 8.0; HDR = YES;]

    Do you have a reference (web site or something) that suggested it?

    What is Ed_Tests$?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Import Row 1 Only on a .txt File
    By newbie in forum Import/Export Data
    Replies: 2
    Last Post: 02-08-2011, 08:23 AM
  2. Import XML file
    By randolphoralph in forum Programming
    Replies: 1
    Last Post: 01-22-2010, 09:12 PM
  3. Import prn file
    By Accessshelp@work in forum Import/Export Data
    Replies: 1
    Last Post: 10-29-2009, 09:16 AM
  4. Import a .sql file?
    By Alan in forum Import/Export Data
    Replies: 1
    Last Post: 06-03-2009, 07:52 PM
  5. CSV File Import
    By compasst in forum Import/Export Data
    Replies: 3
    Last Post: 03-31-2006, 09:37 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