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

    Importing from Excel


    Hi,
    I have a Excel sheet that I am importing. I tryed to import the sheet manualy and it said tha tit could not because there are errors (it does nto say what si wrong). So I wrote the following VBA code and it worked except that some cells in one of the fields are blank, but in the sheet the cells are filled. So for example if I look down the field in Access at record 31 and 32 they are blank but in Excell there is data. I made both the the fielsd in Excel and in Access text for a data type. I tryend sending ot to a text file and importing it in, I tryed linking the tables, and I tryed just copying and pasting the cells in; but it still come up blank. So I am not sure what is wrong and or wah to do.
    Any ideas woudl really be appreaciated.
    Thank you

    Here is the code I used to bring it in:
    Code:
    str2 = "Select [Formated$].* INTO [tblCom07Dump]FROM [Formated$]IN '" & Exls & "'[Excel 8.0; HDR = YES;];"
        cn.Execute str2
    Like I say this si working but some cells are blank.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,943
    Would have to work with the Excel file to test and see if problem replicates. You can attach to post.
    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. Importing an Excel file
    By bvtterflygirl in forum Import/Export Data
    Replies: 5
    Last Post: 02-24-2011, 11:54 PM
  2. Importing the second excel worksheet
    By geoffwbailey in forum Programming
    Replies: 1
    Last Post: 06-25-2010, 12:16 AM
  3. Importing Excel into Access
    By Nel1975 in forum Access
    Replies: 3
    Last Post: 12-30-2009, 10:21 AM
  4. Importing Data From Excel
    By king_bowzow in forum Import/Export Data
    Replies: 1
    Last Post: 09-11-2009, 02:26 AM
  5. Importing from Excel
    By joer in forum Forms
    Replies: 0
    Last Post: 03-14-2007, 02:01 PM

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