Multiple data import from text files

Nils_Junker

Board Regular
Joined
Jun 2, 2023
Messages
80
Office Version
  1. 365
Platform
  1. Windows
Hi everybody,

I got the following problem:

I need to get data from round about 500 text files.
Problem one is that I just need a part of each text file, (the part I need always stays the same)
Problem two is that I dont have enough time to manually convert all the text files one by one.

The following link shows all the files I want to include in my excel


Also how many lines can i insert in Excel?

If you need further Information, please send me an info!

Thanks for your help!
 
Lets sort this out and get onto the next stage.
I don't speak German so I cannot translate the messages.
You need the following folders as sub-folders of the workbook folder.
Downloads
ImportedData
You need a folder called Unzipped which is a sub-folder of the Downloads folder.
You can only select cells in column one.
If you select any cells outside of that column and or not containing a valid filename then
you will get a message as in the attached image.

Please confirm that you have been able to download and unzip at least one file.
Okay so I hadn't created the folder ImportedData butz i've done that now.
Problem is still the same. If I fill for example Column A2 in the query in which range i want to select the error comes up.

And so no i wasn'T able to download and unzip the folders.

If i click on help this site comes up:

1687027598047.png


Thanks for your help and time. I hope we can find a way together to make that work.
 
Upvote 0

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Okay so I hadn't created the folder ImportedData butz i've done that now.
Problem is still the same. If I fill for example Column A2 in the query in which range i want to select the error comes up.

And so no i wasn'T able to download and unzip the folders.

If i click on help this site comes up:

View attachment 93817

Thanks for your help and time. I hope we can find a way together to make that work.
Is it possible that i have top change some settings in my excel?
or is there a differentation between english and german in the setteíngs?
 
Upvote 0
There probably is a difference but not that should have an effect on this running.

Can you put a Breakpoint at the top of the code and step through each line of code using F8.

Only select one file to start with and then two on the next attempt.

If an imported file appears, go back to the VBA Editor and press F8 to continue.
 
Upvote 0
There probably is a difference but not that should have an effect on this running.

Can you put a Breakpoint at the top of the code and step through each line of code using F8.

Only select one file to start with and then two on the next attempt.

If an imported file appears, go back to the VBA Editor and press F8 to continue.
how do i put a breakpoint?
 
Upvote 0
See image

Click where pointed to add a breakpoint.
okay did it.

if i come to this line

1687041449838.png


then i have to answer if i want to clear the data (where you said i should tick "yes" and afterwards i have to insert the range. and at that point the error comes up
 
Upvote 0
See image

Click where pointed to add a breakpoint.
okay i am a little bit closer to the problem.
Firstly I didn't had the worksheet "ImportedData"

now if i go through the code with F8 an error comes up in the following section:

1687156718178.png


the link when i click on help is the fololwing:

So it looks like this at my laptop:
1687156846070.png

On english thi is Runtime Errror 3004, Applicatiob or object defined error.

i think we are close to an end! :)
 
Upvote 0
okay i am a little bit closer to the problem.
Firstly I didn't had the worksheet "ImportedData"

now if i go through the code with F8 an error comes up in the following section:

View attachment 93848

the link when i click on help is the fololwing:

So it looks like this at my laptop:
View attachment 93849
On english thi is Runtime Errror 3004, Applicatiob or object defined error.

i think we are close to an end! :)
 
Upvote 0

Forum statistics

Threads
1,224,837
Messages
6,181,255
Members
453,028
Latest member
letswriteafairytale

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top