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

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
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]

[Table="width:, class:head"]
[tr=bgcolor:#FFFFFF][td=bgcolor:#70AD47]Column1.1[/td][td=bgcolor:#70AD47]Column1.2[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]AhAs3s2s[/td][td=bgcolor:#E2EFDA]100[/td][/tr]

[tr=bgcolor:#FFFFFF][td]AdAs3s2s[/td][td]100[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]AcAs3s2s[/td][td=bgcolor:#E2EFDA]100[/td][/tr]

[tr=bgcolor:#FFFFFF][td]AhKh3s2s[/td][td]100[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]AdAh3s2s[/td][td=bgcolor:#E2EFDA]100[/td][/tr]

[tr=bgcolor:#FFFFFF][td]AcAh3s2s[/td][td]100[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]AdKd3s2s[/td][td=bgcolor:#E2EFDA]100[/td][/tr]

[tr=bgcolor:#FFFFFF][td]AcAd3s2s[/td][td]100[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]AcKc3s2s[/td][td=bgcolor:#E2EFDA]100[/td][/tr]

[tr=bgcolor:#FFFFFF][td]AhA s4s2s[/td][td]100[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]AdAs4s2s[/td][td=bgcolor:#E2EFDA]100[/td][/tr]

[tr=bgcolor:#FFFFFF][td]AcAs4s2s[/td][td]100[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]AhKh4s2s[/td][td=bgcolor:#E2EFDA]100[/td][/tr]
[/table]
 
Upvote 0

Forum statistics

Threads
1,226,693
Messages
6,192,468
Members
453,726
Latest member
JoeH57

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