+ Reply to Thread
Results 1 to 2 of 2

add imported text file name above imported data

  1. #1
    Registered User
    Join Date
    01-21-2009
    Location
    oxford,england
    MS-Off Ver
    Microsoft office 2007
    Posts
    1

    Post add imported text file name above imported data

    Hey,

    I need to import huge amounts of text files in single excel workbooks. The text files are all located in one folder and are named as follows: "A2224.txt" "A2225.txt",... They consist of two columns of data (numbers) each.

    I did find code that is working great to import all textfiles that I select and imports it in a workbook. Each imported textfile is a new sheet in the workbook with the sheet name being the name of the original textfile. The two comuns of data per text file are located in the two columns (A:B) of each imported worksheet.

    the code is as follows:

    Please Login or Register  to view this content.
    now I would like to insert a column header (at B1) in each imported text file/worksheet that has the same name as the worksheet/textfile...

    I am sorry that I can't solve something as simple as this not myself yet, but I am quite new to this. Any help would be most appreciated!

    thank you very much!
    wishes
    Tom

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983

    Re: add imported text file name above imported data

    tompie

    Welcome to Exceltip forum

    Please take a couple of minutes and read the Forum Rules

    Your post does not comply with Rule 5 of our Forum RULES. We have Seven question forums: Miscellaneous, General, Programming, Worksheet Functions, Charting, Excel 2007 Help and New Users. Please choose the appropriate forum, and post your question in ONLY one forum.

    Thread moved to Excel Programming Forum
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

+ 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