+ Reply to Thread
Results 1 to 20 of 20

Import multiple text files into excel

  1. #1
    Registered User
    Join Date
    11-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    10

    Angry Import multiple text files into excel

    I need to import a user's Full Name and the serial number of the workstation they are using into a Spreadsheet. I have been able to gather the data from enviroment varibiles but I want to get it into Excel so the workstations can be automatically created in a Active Directory container.

    This is what the data looks in the attached the text file. Any assistance would be greatly appreciated.

    Full Name John Doe
    SerialNumber
    CB42KS1
    Attached Files Attached Files

  2. #2
    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 excel

    @bginsberg,

    Here you go. Hope this helps.
    Attached Files Attached Files
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  3. #3
    Registered User
    Join Date
    11-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Import multiple text files into excel

    Xlbiznes,

    I'm not sure if you received my previous reply so I figured it would be best to send it again just to be sure. Thank you for the spreadsheet and marco, however when I try to run it or step through the marco I receive an error stating "Something Terrible Has Happened #!%@1004The sort reference is not valid. Make sure that it's withing the data you want to sort,and the first Sort By box isn't the same of blank." Is there something I am not providing? I have no clue. For reference the text files I need pulled into Excel are located in J:\wsinventory.

    I'd appreciate any additional assistance you could provide.

    Cheers,

    @bginsberg

  4. #4
    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 excel

    @bginsberg,

    Can you comment the line

    Please Login or Register  to view this content.
    like this
    Please Login or Register  to view this content.
    run the code and we can find out at which line the issue is.

  5. #5
    Registered User
    Join Date
    11-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Import multiple text files into excel

    I ran the code and it came back with 400.

    The only other thing I changed with I hard coded the Target folder to "J:\wsinventory"

    When I put c:\my data in the InputBox I received:

    Run-time error '1004':

    Application-defined or object-defined error
    Last edited by bginsberg; 11-20-2013 at 02:04 PM. Reason: ran macro again.

  6. #6
    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 excel

    can you remove these lines and try.

    Please Login or Register  to view this content.

  7. #7
    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 excel

    Let us also eliminate these lines by commenting it out.

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

  8. #8
    Registered User
    Join Date
    11-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Import multiple text files into excel

    I removed the above code but saved it in a text file.

  9. #9
    Registered User
    Join Date
    11-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Import multiple text files into excel

    I receive "Invalid procedure call or argument"

  10. #10
    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 excel

    Strange,

    it works perfectly fine on my pc. When the error message appears click debug and it will take you to the line that is causing the issue.

  11. #11
    Registered User
    Join Date
    11-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Import multiple text files into excel

    How do I get to the debug when the error occurs. I am using Excel 2010 if that means anything.

  12. #12
    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 excel

    Can you take a screen shot when the error message appears ?

  13. #13
    Registered User
    Join Date
    11-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Import multiple text files into excel

    I attached a doc with the 3 errors I have received when trying to get this to work.

    Initially, the files are on my AD domain (J:\wsinventory),the I copied the files locally (C:\My Data).

    I appreciate the time you have spent on this. If it wasn't such needed I would have abanded this whole thing by now.

    The bottom line is that once the serialnumbers are in Excel I'm going to import them in our central ITs domain.

    Thanks again
    @bginsberg
    Attached Files Attached Files

  14. #14
    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 excel

    Yeah,

    Will try and get this resolved. We can go also try troubleshooting directly on your pc using team viewer if that is possible.

  15. #15
    Registered User
    Join Date
    11-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Import multiple text files into excel

    Xlbiznes,

    I use Teamviewer all the time but I would have to talk to my Security department to verify that I can let someone into my network.

    I will get back to you shortly and let you know if I can proceed with that method.

  16. #16
    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 excel

    No issues.

    Need to simulate this issue on a pc running excel 2010. Mine is excel 2007.

  17. #17
    Registered User
    Join Date
    11-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Import multiple text files into excel

    I have an Win XP workstation with Excel 2007 on it. I will try the spreadsheet with the lines we have taken out and let you know what happens.

    Thanks

  18. #18
    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 excel

    No Issues.

    Sorry about not being able to resolve your requirement today.

  19. #19
    Registered User
    Join Date
    11-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Import multiple text files into excel

    I greatly appreciate your assistance. I'm sure I will get it to work.

    Thanks again.

  20. #20
    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 excel

    No Issues.

+ 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. Import Multiple text files in different worksheet into Excel 2010
    By rageshprasad in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-06-2014, 07:16 AM
  2. [SOLVED] Import Multiple Text Files into Excel - for beginners
    By rapidasia in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 09-04-2013, 06:39 PM
  3. Macro to Parse Text - Import text to Excel from Multiple Text Files & Folders
    By Novice_To_Excel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-02-2012, 01:05 AM
  4. Import multiple text files into excel
    By jdbaba in forum Excel General
    Replies: 1
    Last Post: 11-19-2011, 04:32 PM
  5. Help to import multiple text files to worksheets in a excel workbook
    By cookiemonster79 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-31-2011, 02:17 PM

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