Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2007
    Posts
    11

    Unanswered: Importing files into Access db

    Hi,

    I have just entered the world of Access db. So my doubt could be very elementary.

    All this while I was importing an excel file into an Access table by first converting the excel file to a text file. It worked fine for many files.

    Now I am facing a problem where in the new table after the import has a particular field which becomes number type where as in the excel file it is of 'text' type. Due to mis-match in the datatypes not all of my data is imported. I tried it by directly importing the data from excel into Access db without an intermediate text file. All the data is imported. My question is 'Why do I need to convert the excel to text before import when I can directly import excel file?'

    Thanks in advance !

    Regards,
    Sowmya

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    the answer: you don't ...but.

    importing XLS allows Access to make all the decisions - this is great when it works and a total pain when it fails.
    example: i have some manufacturing codes that i work with all the time. they are two characters and include '09', '10', '42', '43' (so far so good), 'G4', 'G5', 'FP', FZ'.
    if the XLS has the looks-like-numeric stuff sorted to the top, Access will assume the entire column is numeric and fall over when it hits the first alpha-numeric.

    text, csv etc ...you CONTROL the import.

    izy
    currently using SS 2008R2

  3. #3
    Join Date
    Oct 2007
    Posts
    11
    .. That makes sense to me !!
    I have experienced similar things. If first few rows have numeric, it seemed like the entire column is numeric though it had some alpha numeric in it. Hence the Access imported the column as number instead of Text.

    I presume I can use both the methods depending on the situation.
    The trouble is if I have the code which does the import for me then I will need to take care of the format.

    Thank you for the response.

    Cheers !!

    Quote Originally Posted by izyrider
    the answer: you don't ...but.

    importing XLS allows Access to make all the decisions - this is great when it works and a total pain when it fails.
    example: i have some manufacturing codes that i work with all the time. they are two characters and include '09', '10', '42', '43' (so far so good), 'G4', 'G5', 'FP', FZ'.
    if the XLS has the looks-like-numeric stuff sorted to the top, Access will assume the entire column is numeric and fall over when it hits the first alpha-numeric.

    text, csv etc ...you CONTROL the import.

    izy

Posting Permissions

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