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!
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
but i want that this textfile is directly converted in excel

or how would it normally go on?
So it appears that it was something to with the computer drive that you were using.

Lets move on but know what was causing the problem may be useful in the future.

So now try selecting 10 files for example to see what happens.

So now that it works we can look at what you want to do with these text files,

As you can see, some of them are rather large.

My suggestion is that each text file is imported one at a time and a filter applied to only keep the lines that you need
and put these lines in a single worksheet.

Remind me what the filter is to be.

It still may be that the lines that you want to keep exceed the rows in a worksheet but one step at a time.
 
Upvote 0
So it appears that it was something to with the computer drive that you were using.

Lets move on but know what was causing the problem may be useful in the future.

So now try selecting 10 files for example to see what happens.

So now that it works we can look at what you want to do with these text files,

As you can see, some of them are rather large.

My suggestion is that each text file is imported one at a time and a filter applied to only keep the lines that you need
and put these lines in a single worksheet.

Remind me what the filter is to be.

It still may be that the lines that you want to keep exceed the rows in a worksheet but one step at a time.
I already tried with more files and it works.

the filter does not have to be applied, i already worked out a formula which works.
i need to download about 10 files at a time so i think it would be enough if the text files just automatically go in the other sheet.

each file has 79201 lines times 10 that would fit into excel
 
Upvote 0
So it appears that it was something to with the computer drive that you were using.

Lets move on but know what was causing the problem may be useful in the future.

So now try selecting 10 files for example to see what happens.

So now that it works we can look at what you want to do with these text files,

As you can see, some of them are rather large.

My suggestion is that each text file is imported one at a time and a filter applied to only keep the lines that you need
and put these lines in a single worksheet.

Remind me what the filter is to be.

It still may be that the lines that you want to keep exceed the rows in a worksheet but one step at a time.
so to sum it up, now the only thing which is missing is that the text files will automatically insert in this excel.
is it possible that it automatically is formatted right, so that each information gets a own column?
the disconnector is a ";" i think
 
Upvote 0
so to sum it up, now the only thing which is missing is that the text files will automatically insert in this excel.
is it possible that it automatically is formatted right, so that each information gets a own column?
the disconnector is a ";" i think

Importing just 10 files at a time will take ages and it can be automated.

What is this formula that you have in mind?
 
Upvote 0
Importing just 10 files at a time will take ages and it can be automated.

What is this formula that you have in mind?
it's a FILTER Formula, i already tried it where i manually downloaded a .zip file and used it.
how long does it take round abourt for 10 files?

but if this is easy i only would need the lines from one month.
so it would be from 202305010010 to 202305312350
this information is in a textfile right behind the ID from the station
 
Upvote 0
it's a FILTER Formula, i already tried it where i manually downloaded a .zip file and used it.
how long does it take round abourt for 10 files?

but if this is easy i only would need the lines from one month.
so it would be from 202305010010 to 202305312350
this information is in a textfile right behind the ID from the station
I've written some code to import the files.

It's taking a while so I'll let it run.

I'll then test if there is a faster way.
 
Upvote 0
I've written some code to import the files.

It's taking a while so I'll let it run.

I'll then test if there is a faster way.
okay can you send me the code or will you first look if there is a faster way?

and by the way, thanks man i honestly appreciate your help so much
you are the best :)
 
Upvote 0
There is so much data.

Did you say that you only need certain columns.

If I could only import some it would help.
 
Upvote 0
There is so much data.

Did you say that you only need certain columns.

If I could only import some it would help.
Yes i only need certain columns. In the attached Screenshot you can see which columns i need from the textfile:
1687179954370.png

So i need the "STATIONS_ID", "MESS_DATUM" and "TT_10"

and also as you can see at the "MESS_DATUM" i only need the data from 202305010010 up to 202305312350 (Month May)
 
Upvote 0

Forum statistics

Threads
1,224,042
Messages
6,176,043
Members
452,698
Latest member
MikaVmex

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