+ Reply to Thread
Results 1 to 5 of 5

CSV file with a comma in some text fields how to import

  1. #1
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    CSV file with a comma in some text fields how to import

    Access version 2010 and excel version 2010

    Hi

    I have a CSV file with all full post codes in UK and some other demographic info

    the 3rd field is a tet field with a city name - unfortunately on some of the records they have included a comma
    so

    Bristol, city of
    instead of
    Bristol city of

    for example

    and so my data splits on this comma and then all the other fields do not match up

    because the import wizard is splitting the data on the comma at the first screen, I cant skip that field only just import the data fields I need

    any suggestions on how to fix

    the file is too large for excel

    and i thought of using note pad and just selecting the first half of the data file - pasting into excel and then sorting on one of the columns at i can then group the incorrect fields and then
    delete shift left on those entries = laborious, and also its taking hours to scroll down the text file

    I hoped to be able to select - find say post code ME and then that would highlight the select = but that does not work

    any suggestions to save me a few hours tomorrow welcome

    thanks
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: CSV file with a comma in some text fields how to import

    Wayne,

    CSV files should have any field that includes a comma as part of the text surrounded by double-quotes, like "Bristol, city of"
    If whatever you're using did not output it in that manner, then it did not create the CSV file correctly.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: CSV file with a comma in some text fields how to import

    yes, it does have the "" around the field - so I must be importing incorrectly some how

    I saw the

    "bristol,
    City of"
    in to cells - when I copied a sample into excel and then also say it imported into one cell

    so its years since I have used access

    I just used the external > text> told it was delimited > do i need to tell it about the "," fields ?

    the csv has been supplied from an external source

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: CSV file with a comma in some text fields how to import

    just tested on a small dummy file - I see the option now dah!! thanks - saved me a few hours tomorrow

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: CSV file with a comma in some text fields how to import

    Cross posted at: http://www.mrexcel.com/forum/microso...ow-import.html


    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Import text fields into columns from txt file
    By Pshawn in forum Excel General
    Replies: 3
    Last Post: 01-28-2010, 12:30 PM
  2. Import Text file Fields as Columns in Excel
    By vijay2482 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-12-2009, 11:05 AM
  3. [SOLVED] CANNOT Import comma delimted, quote qualifed text file into Excel.
    By Feiming Chen in forum Excel General
    Replies: 1
    Last Post: 03-01-2006, 05:20 PM
  4. [SOLVED] how could I import a text file with comma separated values into ex
    By Xavi in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-15-2005, 07:05 AM
  5. [SOLVED] I have a Comma delimited text file how do I import in to excel an.
    By trevord in forum Excel General
    Replies: 1
    Last Post: 02-03-2005, 08:06 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1