+ Reply to Thread
Results 1 to 15 of 15

Import multiple text files into 1 workbook

  1. #1
    Registered User
    Join Date
    03-08-2013
    Location
    arizona
    MS-Off Ver
    Excel 2003
    Posts
    8

    Import multiple text files into 1 workbook

    I am a novice and needed to know how do i import multipule txt files into 1 workbook

  2. #2
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: I am a novice and needed to know how do i import multipule txt files into 1 workbook

    Hi,

    can you post a sample of your text file.
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  3. #3
    Registered User
    Join Date
    03-08-2013
    Location
    arizona
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: I am a novice and needed to know how do i import multipule txt files into 1 workbook

    Date Time Well_1_8ft Well_1_6ft Well_1_4ft Well_1_2ft Well_1_0ft
    11-19-2012 00:02:53 25.480 25.310 25.780 26.300 25.810
    11-19-2012 00:07:53 25.510 25.250 25.750 26.280 25.780
    11-19-2012 00:12:54 25.480 25.280 25.750 26.280 25.750
    11-19-2012 00:17:54 25.510 25.280 25.750 26.280 25.720
    11-19-2012 00:22:55 25.480 25.280 25.720 26.300 25.750
    11-19-2012 00:27:55 25.510 25.280 25.750 26.300 25.720
    11-19-2012 00:32:56 25.540 25.310 25.780 26.300 25.690
    11-19-2012 00:37:56 25.510 25.340 25.780 26.300 25.720
    11-19-2012 00:42:56 25.540 25.310 25.780 26.300 25.690
    11-19-2012 00:47:57 25.540 25.340 25.780 26.300 25.690
    11-19-2012 00:52:57 25.510 25.280 25.750 26.280 25.660
    11-19-2012 00:57:58 25.510 25.280 25.750 26.280 25.630
    11-19-2012 01:02:58 25.400 25.160 25.630 26.160 25.510
    11-19-2012 01:07:59 25.480 25.280 25.750 26.280 25.600
    11-19-2012 01:12:59 25.540 25.340 25.780 26.330 25.630
    11-19-2012 01:17:59 25.540 25.340 25.780 26.300 25.570
    11-19-2012 01:23:00 25.570 25.340 25.810 26.360 25.600
    11-19-2012 01:28:00 25.540 25.340 25.780 26.300 25.570
    11-19-2012 01:33:01 25.510 25.310 25.720 26.250 25.540
    11-19-2012 01:38:01 25.540 25.310 25.780 26.300 25.570

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: I am a novice and needed to know how do i import multipule txt files into 1 workbook

    Paste the following code into a Spreadsheet named : "Summary Sheet.xlsm"

    When it is run it will open every text file in its host folder and paste them one after another onto the summary Sheet.

    Enjoy.



    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-08-2013
    Location
    arizona
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: I am a novice and needed to know how do i import multipule txt files into 1 workbook

    any ideas on how this is acomplised

  6. #6
    Registered User
    Join Date
    03-08-2013
    Location
    arizona
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: I am a novice and needed to know how do i import multipule txt files into 1 workbook

    thank you i am getting an error message "block if without end if"

  7. #7
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: I am a novice and needed to know how do i import multipule txt files into 1 workbook

    @riddickisten,

    Here is my solution. Hope this helps.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    03-08-2013
    Location
    arizona
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: I am a novice and needed to know how do i import multipule txt files into 1 workbook

    thank you however i have over 500 files of this type that i need to input into one worksheet

  9. #9
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: I am a novice and needed to know how do i import multipule txt files into 1 workbook

    My apologies

    I simplified it for you and messed it up.

    It works now.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    03-08-2013
    Location
    arizona
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Import multiple text files into 1 workbook

    thank you now i really feel dumb how do i get this to run?

  11. #11
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Import multiple text files into 1 workbook

    @riddickisten,

    thank you however i have over 500 files of this type that i need to input into one worksheet
    The solution i have provided does that. It loops through all the txt files that are present in the folder that the user inputs at the beginning of the process.

    You have to make sure that all the .txt files are present in that folder.

  12. #12
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Import multiple text files into 1 workbook

    I have added a button on this for you
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    03-08-2013
    Location
    arizona
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Import multiple text files into 1 workbook

    Thank you so much for all your help ! one question... i get an error message that says the macro may not be available in this workbook or all macros may be disabled so i went to the developer and set the security to enable all macros however it still give the same message

  14. #14
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Import multiple text files into 1 workbook

    My apologies

    If you had right clicked on the button and selected edit you would have found that the button was linked to a macro called Summarise_Sheet.

    However I had renamed the macro Summarise, hence the error. The macro it was looking for didn't exist.

    I have checked the attached version and improved on it for you.

    My apologies.
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    03-08-2013
    Location
    arizona
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Import multiple text files into 1 workbook

    Thanks alot!! live saver....

+ 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