Import txt file into Excel to create contacts list

%3CLINGO-SUB%20id%3D%22lingo-sub-160359%22%20slang%3D%22en-US%22%3EImport%20txt%20file%20into%20Excel%20to%20create%20contacts%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-160359%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CP%3EI%20was%20given%20a%20list%20of%20contacts%20by%20a%20user%20as%20a%20text%20file.%26nbsp%3B%20It%20is%20formatted%20loosely%20as%20comma%20delimited%20values%20(CSV)%20but%20not%20very%20consistently.%26nbsp%3B%20It%20has%20some%20semicolons%20inserted%20after%20phone%20numbers%2C%20for%20some%20reason%2C%20and%20commas%20after%20some%20last%20names%20(not%20all)%2C%20as%20well%20as%20a%20few%20email%20addresses%20associated%20with%20some%20names%20(again%2C%20not%20all).%3CBR%20%2F%3E%3CBR%20%2F%3EMy%20problem%20is%20when%20I%20import%20it%20to%20Excel%202016%20the%20data%20just%20comes%20in%20as%20one%20long%20column%2C%20as%20opposed%20to%20a%20column%20with%20the%20names%2C%20another%20with%20the%20addresses%2C%20another%20with%20phone%20numbers%2C%20etc..%26nbsp%3B%20%3CBR%20%2F%3E%3CBR%20%2F%3EIs%20there%20a%20way%20to%20automate%20this%20to%20quickly%20create%20separate%20columns%20with%20the%20appropriate%20headings%20and%20pertinent%20data%20in%20them%3F%26nbsp%3B%20I%20don't%20want%20to%20spend%20too%20much%20time%20cleaning%20up%20the%20text%20file%20line%20by%20line%20of%20all%20the%20little%20issues%20it%20has.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAny%20help%20is%20appreciated.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-160359%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-160513%22%20slang%3D%22en-US%22%3ERe%3A%20Import%20txt%20file%20into%20Excel%20to%20create%20contacts%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-160513%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Marco%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMaybe%20try%20this%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EIn%20your%20%3CSTRONG%3EExcel%3C%2FSTRONG%3E%20spreadsheet%2C%20go%20to%20%3CSTRONG%3EData%3C%2FSTRONG%3E%20tab%20%26gt%3B%20%3CSTRONG%3EFrom%20Text%3C%2FSTRONG%3E.%3C%2FLI%3E%0A%3CLI%3ELocate%20and%20open%20the%20%3CSTRONG%3ECSV%3C%2FSTRONG%3E%20file%20you%20want%20to%20import.%3C%2FLI%3E%0A%3CLI%3EBy%20default%20it%20will%20have%20%3CSTRONG%3EDelimited%3C%2FSTRONG%3E%20selected.%26nbsp%3B%3C%2FLI%3E%0A%3CLI%3EIf%20your%20%3CSTRONG%3ECSV%3C%2FSTRONG%3E%20has%20headers%2C%20tick%20the%20%3CSTRONG%3EMy%20data%20has%20headers%3C%2FSTRONG%3E%20box.%3C%2FLI%3E%0A%3CLI%3EClick%20the%20%3CSTRONG%3ENext%3C%2FSTRONG%3E%20button.%3C%2FLI%3E%0A%3CLI%3EUntick%3CSTRONG%3E%20Tab%3C%2FSTRONG%3E%26nbsp%3Banbd%20tick%20%3CSTRONG%3EComma%3C%2FSTRONG%3E%20in%20the%3CSTRONG%3E%20Delimiters%3C%2FSTRONG%3E%20section.%20When%20you%20make%20this%20change%2C%20you%20will%20see%20the%20%3CSTRONG%3ECSV%3C%2FSTRONG%3E%20data%20change%20in%20the%20%3CSTRONG%3EData%20preview%3C%2FSTRONG%3E%20section%20below%20(hopefully%20the%20data%20is%20looking%20to%20be%20grouped%20right).%3C%2FLI%3E%0A%3CLI%3EClick%20the%20%3CSTRONG%3ENext%3C%2FSTRONG%3E%20button.%3C%2FLI%3E%0A%3CLI%3EYou%20can%20choose%20how%20you%20want%20the%20columns%20to%20be%20formatted.%3C%2FLI%3E%0A%3CLI%3EClick%20the%20%3CSTRONG%3EFinish%3C%2FSTRONG%3E%20button%20when%20complete.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3EIf%20there%20are%20still%20issues%20with%20the%20data%2C%20then%20it%20could%20be%20that%20the%20CSV%20wasn't%20consistently%20formatted%20which%20is%20throwing%20things%20off.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESee%20how%20you%20go%20and%20let%20us%20know%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECheers%3C%2FP%3E%0A%3CP%3EDamien%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2263665%22%20slang%3D%22en-US%22%3ERe%3A%20Import%20txt%20file%20into%20Excel%20to%20create%20contacts%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2263665%22%20slang%3D%22en-US%22%3E%3CP%3Eyou%20can%20save%20text%20file%20as%20csv%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eopen%20in%20notepad%3C%2FP%3E%3CP%3Ego%20to%20save%20as%3C%2FP%3E%3CP%3Echange%20file%20extension%20to%20csv%3C%2FP%3E%3CP%3Echoose%20all%20files%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eimport%20from%20this%20csv%20file%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

Hello,

I was given a list of contacts by a user as a text file.  It is formatted loosely as comma delimited values (CSV) but not very consistently.  It has some semicolons inserted after phone numbers, for some reason, and commas after some last names (not all), as well as a few email addresses associated with some names (again, not all).

My problem is when I import it to Excel 2016 the data just comes in as one long column, as opposed to a column with the names, another with the addresses, another with phone numbers, etc.. 

Is there a way to automate this to quickly create separate columns with the appropriate headings and pertinent data in them?  I don't want to spend too much time cleaning up the text file line by line of all the little issues it has.

 

Any help is appreciated.

2 Replies

Hi Marco

 

Maybe try this?

 

  1. In your Excel spreadsheet, go to Data tab > From Text.
  2. Locate and open the CSV file you want to import.
  3. By default it will have Delimited selected. 
  4. If your CSV has headers, tick the My data has headers box.
  5. Click the Next button.
  6. Untick Tab anbd tick Comma in the Delimiters section. When you make this change, you will see the CSV data change in the Data preview section below (hopefully the data is looking to be grouped right).
  7. Click the Next button.
  8. You can choose how you want the columns to be formatted.
  9. Click the Finish button when complete.

If there are still issues with the data, then it could be that the CSV wasn't consistently formatted which is throwing things off.

 

See how you go and let us know?

 

Cheers

Damien

you can save text file as csv

 

open in notepad

go to save as

change file extension to csv

choose all files 

 

import from this csv file