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

Batch importation of TXT files without VBA or macros?


My employer has emasculated Excel 2016 by deactivating VBA and macros. But for a work-related side-project of mine, I need to import some 275 TXT files into Excel, ideally resulting in 275 or so worksheets or workbooks--one for every TXT file.

Can that be done without VBA or macros?

Power Query allows me to import the files, but I have not discovered a way to do it in one fell swoop. So I'm reduced to importing all the files "from folder" and filtering and loading them one by one  in the "edit" mode.

Is there a way for me to define the imporation parameters once in Power Query, and then let Power Query perform the importation of all files in one go?



Hi Greenwell and welcome to the Forum.

I'd normally try to answer your question but I don't really use Power Query sorry.. You could try using several queries (one per folder) in the same file then filter/extract but it might be easier just to import each text file directly into a worksheet (or book). Hope someone else knows how to help more.

Given your employer has reduced the functionality of Excel, they will end up paying you to do this stuff manually! Such a boring task won't improve your motivation much either, sadly.
John_Ru (rep: 4312) Nov 3, '22 at 4:01 pm
Add to Discussion

Answer the Question

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