Closed Thread
Results 1 to 14 of 14

problem converting multiple text files into excel worksheets macro

  1. #1
    Registered User
    Join Date
    02-20-2009
    Location
    La, CA
    MS-Off Ver
    Excel 2003
    Posts
    70

    problem converting multiple text files into excel worksheets macro

    hey guys

    i have many file text which i want to open in an excel workbook in a way that each text file will be displayed in an excel sheet.

    is that doable? thanks for your help in advance
    regards
    Last edited by mehdoush; 04-03-2009 at 01:06 PM.

  2. #2
    Registered User
    Join Date
    02-20-2009
    Location
    La, CA
    MS-Off Ver
    Excel 2003
    Posts
    70

    Re: problem converting multiple text files into excel worksheets macro

    any help plz ???

  3. #3
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    Re: problem converting multiple text files into excel worksheets macro

    Hi
    save the attached file in the folder containing text files and run the macro
    Ravj
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    02-20-2009
    Location
    La, CA
    MS-Off Ver
    Excel 2003
    Posts
    70

    Re: problem converting multiple text files into excel worksheets macro

    thank you so much ravishankar

    regards

  5. #5
    Registered User
    Join Date
    11-18-2010
    Location
    INDIA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: problem converting multiple text files into excel worksheets macro

    Hi,

    I tried using the macro udated in the forum. But i get an error , I have attached the Print screen of the error. Please can you help me out in resolving the issue.

    Regards,
    Santhosh
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    Re: problem converting multiple text files into excel worksheets macro

    Hi
    When you run the macro, did you find a list of text files in sheet1?
    ravi

    Quote Originally Posted by santhoshbes View Post
    Hi,

    I tried using the macro udated in the forum. But i get an error , I have attached the Print screen of the error. Please can you help me out in resolving the issue.

    Regards,
    Santhosh

  7. #7
    Registered User
    Join Date
    11-18-2010
    Location
    INDIA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: problem converting multiple text files into excel worksheets macro

    Quote Originally Posted by ravishankar View Post
    Hi
    When you run the macro, did you find a list of text files in sheet1?
    ravi
    Yes, I am able to see the Text file names in the sheet 1.

  8. #8
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    Re: problem converting multiple text files into excel worksheets macro

    Hi
    try altering this code to
    Please Login or Register  to view this content.
    also look for characters in the filename which your error message suggests
    I tested the macro again and it is working OK
    ravi

  9. #9
    Registered User
    Join Date
    11-12-2010
    Location
    uae
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: problem converting multiple text files into excel worksheets macro

    Hi Ravi,

    It's really good. Is there a possibility to take txt files from any particular drives / folders?

    Thanks

    ravi

  10. #10
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    Re: problem converting multiple text files into excel worksheets macro

    save your excel file inside the drive or folder of your choice and run the macro.or specify the path in the macro as cells(1,2) = "C:\mydocuments\" (replace the formula with the path)
    and run
    Ravi
    Quote Originally Posted by raviexcel View Post
    Hi Ravi,

    It's really good. Is there a possibility to take txt files from any particular drives / folders?

    Thanks

    ravi

  11. #11
    Registered User
    Join Date
    03-06-2011
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: problem converting multiple text files into excel worksheets macro

    Quote Originally Posted by ravishankar View Post
    Hi
    save the attached file in the folder containing text files and run the macro
    Ravj
    I have downloaded this and added it to the folder that contains my txt files. It seems to work fine, but the only problem is in each sheet it has lumped all the data into column A with no spaces, instead of having separate columns. How can I fix this?

    Many thanks

  12. #12
    Registered User
    Join Date
    04-10-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: problem converting multiple text files into excel worksheets macro

    Quote Originally Posted by ravishankar View Post
    Hi
    save the attached file in the folder containing text files and run the macro
    Ravj
    Thanks Ravishankar. The program is superb, fantastic.

    Arun.

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

    Re: problem converting multiple text files into excel worksheets macro

    Hey guys
    This is a bit late but here goes...

    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 its difficult to get the data into new columns. 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!

  14. #14
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: problem converting multiple text files into excel worksheets macro

    Scytheslash,

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

Closed 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