+ Reply to Thread
Results 1 to 4 of 4

Excel 2007 : Import text files to Excel

  1. #1
    Registered User
    Join Date
    02-24-2010
    Location
    Kuala Lumpur
    MS-Off Ver
    Excel 2007
    Posts
    1

    Question Import text files to Excel

    When import text files to Excel, Column Data format by default is General format. How could I change the default setting to Text format instead. It is time consuming to change the column setting from General to Text column by column during the importing process.

  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: Import text files to Excel

    I don't believe you can change the DEFAULT, but if you're always importing similar files, you can construct a macro to do the import for you.

    Turn on the macro recorder and let it record as you select a file for import and run through all the settings one time, then the recorder has the code. That can be tweaked to be more versatile.

    Post the resulting code here and we can help you make it a little more dynamic.
    _________________
    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
    Registered User
    Join Date
    03-08-2010
    Location
    Scottsdale, AZ
    MS-Off Ver
    Excel 2003
    Posts
    1

    Thumbs up Re: Import text files to Excel

    Quote Originally Posted by JBeaucaire View Post
    I don't believe you can change the DEFAULT, but if you're always importing similar files, you can construct a macro to do the import for you.

    Turn on the macro recorder and let it record as you select a file for import and run through all the settings one time, then the recorder has the code. That can be tweaked to be more versatile.

    Post the resulting code here and we can help you make it a little more dynamic.
    This was driving me insane for about an hour. Thanks for such a clear, concise answer!

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

    Re: Import text files to Excel

    My pleasure. If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.


    =======
    NOTE: No need to "quote" previous posts, it just clutters your own thread making it harder to find the new commentary. Just use the QUICK REPLY box below. Of course, use the quote button to quote out specific things you want to discuss... Cheers.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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