Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

How to create multiple excel files with the data and file name of text files.

0

Hello 

  I have a problem to be solved in excel vba. My requirement is , I have a folder with several text / doc files. I need a folder with excel files with same file names which are in the text folder and the data in the text files should be in the excel file.   Simply importing data from text file and saving the file with the text file name from which the data is extracted. This should be done to all the text files that are available in the folder( usually I will have 100 text file in the folder.   Thank you in advance for your help   Plz call me/text me/ mail me/WhatsApp me at any time regarding this.   I will be waiting for your reply   Thanking you Prasad +91 9291313607 tradersbasket@gmail.com     To explain my query breafly I came up with the live example.  I have 100 text files in folder A. I need 100 excel files in folder B with same file names as in the folder A. Each excel file should have the data extracted from the same text file name.     Or to say it in technical way. Find the first text file in folder A , import that data and save the excel file with the same file name but with excel file extension. Loop this until / for all the files in folder A.   Hope I explained well enough. If not let me know/ call me/ WhatsApp me/ text me/ email me.   Thanking you in advance.

name: Prasad.

WhatsApp +91 9291313607

Email:tradersbasket@gmail.com      

Answer
Discuss

Discussion

Hello Prasad and welcome to the Forum.

Your problem seems reasonably clear but a couple of questions please...

1) What are the text files llike? (Long paragraphs don't always convert to single columns)
2) What have you done so far to solve your problem?

Kindly edit your original question to add Excel files (only) to give a sample (manually-convetred) file and to illustrate your VBA code so far. You can use the  Add Files... button below the question text.
John_Ru (rep: 6102) May 5, '21 at 11:13 am
1 ) actually they are doc files/ CSV type files from which we extract data to excell.
2) working on moving files to folders and subfolders, but not sure how to approach my goal.

Looking for a complete solution.
Tradetradersbasket@gmai
PmkPrasad May 5, '21 at 2:25 pm
Add to Discussion



Answer the Question

You must create an account to use the forum. Create an Account or Login