Results 1 to 15 of 15
  1. #1
    looperboy is offline Novice
    Windows XP Access 2002
    Join Date
    Aug 2016
    Posts
    6

    Importing Email CSV

    Hi



    I have a CSV file that I am trying to import into Access. The file is just a lot of email addresses separated by commas. They are not in individual rows. When I try to create a table by importing the file it makes each email address a field in itself, but I just want my table to have one field ('Email') and for each address to be a separate entry in that field. Is it possible to do this?

    Thanks

    Stuart

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    If you have a CSV file and inside this file are email addresses separated by commas, each email address is a record. CSV stands for Comma Separated Value. In addition to the comma, there should be a qualifier. Sometimes you will see double quotes as a qualifier.
    "stuff","more stuff"

  3. #3
    looperboy is offline Novice
    Windows XP Access 2002
    Join Date
    Aug 2016
    Posts
    6
    Hi

    There don't seem to be any qualifiers. Just the commas.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Please post some sample data.

    Can you post the csv or copy and paste 5 or 10 records?

  5. #5
    looperboy is offline Novice
    Windows XP Access 2002
    Join Date
    Aug 2016
    Posts
    6
    It looks like this:

    looper@looperama.com,cozycatparker@y...oper@gmail.com

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    I do not believe qualifiers are mandatory. It just helps to distinguish the fields. As for the import process, it sounds like everything is working as expected.

    What are you trying to do, specifically? Are you trying to place groups of addresses into a single field? Are you trying to place all of the addresses into a single field?

    After you run the initial import, you can query the resulting table and concatenate values retrieved. This way you can add semicolons and spaces, which would be appropriate for inserting into a cc or bcc.

  7. #7
    looperboy is offline Novice
    Windows XP Access 2002
    Join Date
    Aug 2016
    Posts
    6
    I'm just trying to place all of the addresses into a single field, but import creates a table where each addresses is its own field. The table always ends up having 255 fields, and it says the rest of the addresses can't be imported cause 255 is the limit for number of fields.

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716

  9. #9
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    I see. I understood it as the import was creating multiple records, where each address was added to a different row. Considering your last post, it seems each address is creating a new column.

    @orange
    The only way I can imagine the file is formatted is like this ...
    Code:
    12345,12345,12345,12345,12345,12345,12345
    So I guess the file will have to opened and parsed. Were you going to work up text stream thing?

  10. #10
    looperboy is offline Novice
    Windows XP Access 2002
    Join Date
    Aug 2016
    Posts
    6
    Yes, that's the way the file is formatted. I tried to post a sample above, but the forum hasn't displayed it properly. But yes, each place you have 12345 is an email address. I used an email verification service to clear out my old list, and that's just how the CSV came back. I maybe removed the quotation marks myself when originally exporting the email addresses from Access into a CSV to use for verifying. Is there a way I can make a table from this data?

  11. #11
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Yes it seems a textstream-- readall or read(100);then see what makes sense. It sounds from post that it is a list of emailaddresses.
    so 1 email address per record?

    How big is the csv file?
    Can you post it (as a zip)?

  12. #12
    looperboy is offline Novice
    Windows XP Access 2002
    Join Date
    Aug 2016
    Posts
    6
    I worked out a simple solution for this, so I'll post it here in case anyone else is having the same problem.

    1) Open the .csv file in word- or any text editing app with find and replace capability.

    2) Do a Find and Replace action. In the find field, put a comma- in the replace field put Paragraph Mark (^p)

    3) Hit Find and Replace All. Word will make each email address its own column.

    4) Save the file and import it into Access. The email addresses will now be in one field, one addresses per row.

  13. #13
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,858
    Quote Originally Posted by looperboy View Post
    I worked out a simple solution for this, so I'll post it here in case anyone else is having the same problem.

    1) Open the .csv file in word- or any text editing app with find and replace capability.

    2) Do a Find and Replace action. In the find field, put a comma- in the replace field put Paragraph Mark (^p)

    3) Hit Find and Replace All. Word will make each email address its own column.

    4) Save the file and import it into Access. The email addresses will now be in one field, one addresses per row.
    TBH, I would prefer them as seperate records? Easier to maintain if you do not want to send to the odd address now and again.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  14. #14
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    7 years old . . . but that's ok I guess.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  15. #15
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,858
    I always click on New Posts or Todays Posts, so no idea how that happened?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

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

Similar Threads

  1. Replies: 3
    Last Post: 12-28-2015, 04:11 PM
  2. Replies: 5
    Last Post: 05-07-2014, 09:25 AM
  3. Replies: 1
    Last Post: 05-01-2014, 11:37 AM
  4. problem with importing email attachments to access
    By funi.t in forum Import/Export Data
    Replies: 1
    Last Post: 12-20-2011, 10:20 AM
  5. importing email into table
    By ObjectStuart in forum Import/Export Data
    Replies: 1
    Last Post: 12-18-2011, 12:21 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