B
B
brrr2015-03-11 08:09:01
excel
brrr, 2015-03-11 08:09:01

Cfg file to excel how to convert?

There are files in cfg format
The internal is
[user]
Param1=value
Param2=value
....
ParamN=value
How can I quickly drive these files into excel with columns param1,param2,..., paramN?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
John Smith, 2015-03-11
@ClearAirTurbulence

For a single file - create an empty document in excel
Go to the DATA ribbon (Data)
In the Get External Data group (Get external data) click the From text button (from text)
Enter the path to the file, OK
In the first dialog, make sure that Delimited \ s is selected delimiters, Next\Next
Uncheck the tabs, type "=" in the field other\other, Next\Next, Finish\
Done cells in the first column have a "[" symbol, or rows where the cells in the second column have no values).
Allocate the resulting array, copy
Look for free space (like another sheet), Paste Special, check transpose, ok
Get param1-n as column headings in row 1, value1-n below them.
You can throw them into one common table manually or with tricky magic (vba \ lookup \ match substitution formulas). If there are less than 50 files and this is only once, manually will be faster*.
* provided that all cfgs are identical in structure, i.e. for example, in the third line they always have "Parameter 3", and in the fifth - "Parameter 5".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question