+ Reply to Thread
Results 1 to 4 of 4

Importing Fixed Width Text Data Into Excel

  1. #1
    Registered User
    Join Date
    06-22-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    4

    Importing Fixed Width Text Data Into Excel

    Does anyone know of a wizard, 3rd party software, or other shortcut--as opposed to having to insert the column dividers manually--for importing a fixed-width text file into excel? Any advice would be greatly appreciated. The files I'm having to import consist of dozens and dozens of columns. Thanks!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Importing Fixed Width Text Data Into Excel

    If the files are all the same format, you can make your own reusable macro by turning on the macro recorder, then manually importing one of the files. That macro would have all the base columns you've noted, a little tweaking on that macro could make it import all the files in a single folder of the same format.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,835

    Re: Importing Fixed Width Text Data Into Excel

    I tend to use the "Import External Data from Text" command on the Data Group. Select "Import from text", navigate to the text file, and open -- which brings up the text import wizard. From there you can select either a delimiter or a fixed width, specify where the column breaks are (if Excel's default detection doesn't correctly locate the breaks), format each column to import numbers or text, and so on. At the end, you can set the properties of the data import (prompt for file on refresh or not, how often to refresh or manually refresh, and so on).
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Registered User
    Join Date
    06-22-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    4

    Re: Importing Fixed Width Text Data Into Excel

    Thanks! Unfortunately, they aren't the same file. My job requires several files to be imported throughout the year, and they are all different. The 'regular' way is incredibly time-consuming---I was hoping to find an easier way. I've heard you can do it in Access.

+ 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. Fixed Width Text to Excel with fixed break lines.
    By jameel30 in forum Word Formatting & General
    Replies: 1
    Last Post: 08-10-2012, 08:57 PM
  2. Problem with importing multiple data files with fixed width format
    By sport_logo in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-21-2010, 07:34 AM
  3. Replies: 1
    Last Post: 08-04-2006, 11:04 PM
  4. [SOLVED] Changing fixed width (column break) defaults when importing text
    By NaughtonNJ in forum Excel General
    Replies: 1
    Last Post: 05-03-2006, 01:20 PM
  5. Basic Q: Field/Array info when importing fixed-width text files
    By KR in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-01-2005, 05: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