Import .txt to Excel?

Thomas79

New Member
Joined
Oct 26, 2018
Messages
1
Hey! I have enormous amount of data in .txt which I need to be converted to Excel. Data looks like this:

AhAs3s2s@100,AdAs3s2s@100,AcAs3s2s@100,AhKh3s2s@100,AdAh3s2s@100,AcAh3s2s@100,AdKd3s2s@100,AcAd3s2s@100,AcKc3s2s@100,AhAs4s2s@100,AdAs4s2s@100,AcAs4s2s@100,AhKh4s2s@100, (...)

Outcome has to be like this:

[ COLUMN 1 ][ COLUMN 2 ]
[ AhAs3s2s ][ 100 ]
[ AdAs3s2s ][ 100 ]
[ AcAs3s2s ][ 100 ]
[ AdAh3s2s ][ 100 ]
etc.

I tried so many things and came nowhere close to the final result. Is there anyone able to help me?
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
you can try PowerQuery

Code:
[SIZE=1]let
    Source = Table.ToColumns( Csv.Document(File.Contents("Z:\TestFolder\test.txt"),[Delimiter=",", Columns=13, Encoding=1252, QuoteStyle=QuoteStyle.None])),
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandListColumn(#"Converted to Table", "Column1"),
    #"Split Column by Delimiter" = Table.SplitColumn(#"Expanded Column1", "Column1", Splitter.SplitTextByDelimiter("@", QuoteStyle.Csv), {"Column1.1", "Column1.2"})
in
    #"Split Column by Delimiter"[/SIZE]

Column1.1Column1.2
AhAs3s2s100
AdAs3s2s100
AcAs3s2s100
AhKh3s2s100
AdAh3s2s100
AcAh3s2s100
AdKd3s2s100
AcAd3s2s100
AcKc3s2s100
AhA s4s2s100
AdAs4s2s100
AcAs4s2s100
AhKh4s2s100
 
Upvote 0

Forum statistics

Threads
1,214,864
Messages
6,121,986
Members
449,058
Latest member
oculus

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