+ Reply to Thread
Results 1 to 4 of 4

Excel 2007 : Load text files into new columns of spreadsheet

  1. #1
    Registered User
    Join Date
    05-18-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Load text files into new columns of spreadsheet

    I checked out a similar thread which answers some of this question
    http://www.excelforum.com/excel-prog...ets-macro.html

    and this blogpost which does it without code (but adds data continuously to the same column):
    http://blogs.office.com/b/microsoft-...hout-code.aspx

    But i was wondering, is it possible to format this code, such that i can get all the text files in new columns and NOT in new sheets? And also is it possible to, say... give a column gap after every 32 files? I have loads of .txt files with no delimiters, so it's difficult to get the data into new columns, by simple formatting. I just want each new file to start in a new column, (and they all have only one row of data), and after 32 such columns there has to be an additional column left empty, and the next 32 files loaded.

    Thanks, in advance!

  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: Load text files into new columns of spreadsheet

    'TXTs TO COLUMNS
    Here's a macro for importing all the txt files in a folder into separate columns of a single sheet. The filename each dataset comes from is placed at the top of each column.
    In the macro, to add the blank column in every 33rd column, change this:

    Please Login or Register  to view this content.

    ...to this:
    Please Login or Register  to view this content.
    _________________
    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
    05-18-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Load text files into new columns of spreadsheet

    Thank you, SO, SO much Jerry
    The past 2 days have been real fun, i got to tweak around with excel a lot, and i didn't even know I could DO this stuff in Excel!

    Just one thing, what's the
    Please Login or Register  to view this content.
    do? I checked and it seems it has something to do with indicating the platform on which you're working?

    Thanks again, this really helps me with my work

  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: Load text files into new columns of spreadsheet

    That is correct, the three platforms would be:

    xlMacintosh
    xlWindows
    xlMSDOS

+ 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