+ Reply to Thread
Results 1 to 11 of 11

Import text to column from .txt .doc file!

  1. #1
    Registered User
    Join Date
    06-06-2012
    Location
    Romania
    MS-Off Ver
    Excel 2003
    Posts
    8

    Import text to column from .txt .doc file!

    Hello!

    I'm having difficulty finding out how to import words from an external file into Excel, to columns!

    The external text file contains: a few thousand words separated by space/comma!
    I want the words to be placed on different cells in a column!

    I tried Text To Column+Paste Special(transpose) after I pasted some text to a row, i can do this for a few words,but, for a few thousand is way to slow!

    Thanks

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Import text to column from .txt .doc file!

    Hello arhicad,

    Welcome to the Forum!

    It would help to see the text file.

    To Attach a File:

    1. Scroll down to the window below your post Additional Options
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    06-06-2012
    Location
    Romania
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Import text to column from .txt .doc file!

    text.txt

    Ok here is the text file!!

  4. #4
    Registered User
    Join Date
    06-06-2012
    Location
    Romania
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Import text to column from .txt .doc file!

    Well this is basically a model text file...here the words are separated by space...sometime they will be by commas ","!
    I want to be able to put this words on a column, one word in a cell!
    Cheers

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Import text to column from .txt .doc file!

    what was wrong with text to columns?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  6. #6
    Registered User
    Join Date
    06-06-2012
    Location
    Romania
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Import text to column from .txt .doc file!

    The down side of Text To Columns, is that after i paste the text into excel, all the words are spaced in different cell than i need to do text to column on every single line! Is there an easier way? or I'm not using Text to column the right way? Can i import text files into excel and use text to columns function all at once?

  7. #7
    Registered User
    Join Date
    06-06-2012
    Location
    Romania
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Import text to column from .txt .doc file!

    and if i paste all the words in one cell..and use text to columns,,than the final result its to large to fit in one row...normally after this i copy the row and with paste special ,transpose it to a column..but its way slow!
    Last edited by arhicad; 06-06-2012 at 02:18 PM.

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Import text to column from .txt .doc file!

    so you have more than 256 items to split on one row?
    as for text to columns use excel to open the .txt
    File, Open, enter or select File Name, choose All Files from “Files of Type” find your text file and the text to columns wizard will open
    Last edited by martindwilson; 06-06-2012 at 03:24 PM.

  9. #9
    Registered User
    Join Date
    06-06-2012
    Location
    Romania
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Import text to column from .txt .doc file!

    Hey Martin...i want the text to be on column A like here in the picture 11.jpg ...after i open the .txt file and used text to column look like in picture 2 2.jpg! and after that copy + paste special transpose to have them on a single column! this is not a big .txt file so i can do it manually. but i was thinking maybe is an easier way for doing this!! Thanks

  10. #10
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Import text to column from .txt .doc file!

    Hello arhicad,

    This macro will let you choose the text file to import to Excel.
    Please Login or Register  to view this content.

  11. #11
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Import text to column from .txt .doc file!

    open text file with word
    find space replace with ^t replace all
    copy paste into excel as unformatted text
    you may have some blanks
    filter on blanks delete the rows

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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