Rampage123
New Member
- Joined
- Apr 19, 2020
- Messages
- 1
- Office Version
- 2016
- Platform
- Windows
Hi everyone,
I am trying to import data from .ini files with Power Query on Excel 2016, These files will contain various information that I do not want. I only want the values that are below a certain heading [Calpoints] and above a certain heading [Lower]. The amount of values will vary but the Headings will always be there and will be exactly the same. This is what a file would contain:
File name: 1A.ini
[General]
CalType=Instantaneous
CTRatio=Direct: 6A
NetAddr=1
[Polynomial]
Degree=2
2=0.639087543667983
1=2.05102538315623
0=-12.019992726895
[CalPoints]
4.006=6.1789
4.967=14.5015
6.282=25.9087
[Lower]
ZeroFlowKW=2
MinKW=2
.....other data etc
The bold values corresponds to kW and m3/h so they will also have to be seperated by the equal sign
So my end goal would be to get the data in bold on a spreadsheet in a table as such automatically so i can just drop new files into the folder:
I am only looking for some guidance as to what I will need to learn to achieve this and where I should start...
What I am struggling with is getting only the exact data from the .ini file. Should a script be written to first edit these files(don't know how to yet) or is this possible in power query directly?
Any help or tips will be appreciated
Thanks,
Richardt
I am trying to import data from .ini files with Power Query on Excel 2016, These files will contain various information that I do not want. I only want the values that are below a certain heading [Calpoints] and above a certain heading [Lower]. The amount of values will vary but the Headings will always be there and will be exactly the same. This is what a file would contain:
File name: 1A.ini
[General]
CalType=Instantaneous
CTRatio=Direct: 6A
NetAddr=1
[Polynomial]
Degree=2
2=0.639087543667983
1=2.05102538315623
0=-12.019992726895
[CalPoints]
4.006=6.1789
4.967=14.5015
6.282=25.9087
[Lower]
ZeroFlowKW=2
MinKW=2
.....other data etc
The bold values corresponds to kW and m3/h so they will also have to be seperated by the equal sign
So my end goal would be to get the data in bold on a spreadsheet in a table as such automatically so i can just drop new files into the folder:
Site | Date created(from file) | kW 1 | kW 2 | kW 3 | m3/h 1 | m3/h 2 | m3/h 3 | ||
1A | date of file created | 4.006 | 4.967 | 6.282 | 6.1789 | 14.5015 | 25.9087 |
I am only looking for some guidance as to what I will need to learn to achieve this and where I should start...
What I am struggling with is getting only the exact data from the .ini file. Should a script be written to first edit these files(don't know how to yet) or is this possible in power query directly?
Any help or tips will be appreciated
Thanks,
Richardt