Forum Discussion
PierreL69
1 year agoHelper IV
Import correctly CSV into power query
Hello everyone, I am contacting you because I am having trouble importing a CSV file into Power Query, but without success... I can't seem to find the right method to do this. What drives me even c...
- Anonymous1 year ago
I can import the file using this MCode:
= Csv.Document(File.Contents("Z:\test.csv"),[Delimiter=";", Encoding=1201, QuoteStyle=QuoteStyle.Csv])
Or do I miss something?
- 1 year ago
Victory it works, so what differ between what I did and what you did is the encoding number you used "1201"
Could you explain me how you selected this "encoding system" ?
Anonymous
1 year agoNot applicable
I can import the file using this MCode:
= Csv.Document(File.Contents("Z:\test.csv"),[Delimiter=";", Encoding=1201, QuoteStyle=QuoteStyle.Csv])
Or do I miss something?
wardy912
1 year agoSuper User
Hero! that works for me
let
Source = Csv.Document(File.Contents("C:\Users\Alex.Ward\Downloads\test\test.csv"),[Delimiter=";", Encoding=1201, QuoteStyle=QuoteStyle.Csv]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
#"Promoted Headers" = Table.PromoteHeaders(#"Changed Type", [PromoteAllScalars=true]),
#"Changed Type1" = Table.TransformColumnTypes(#"Promoted Headers",{{"Bbcln bznbTT", Int64.Type}, {"blbTltTn bp", Int64.Type}, {"pTcBbT cBBpzbt bp", Int64.Type}, {"cBBpzbt bcnT", type text}, {"BzstpnTT TypT", type text}, {"STTvlBT GTpzp", type text}, {"ScbTs pXXlBT", type text}, {"TTXTTTbBT bp", type text}, {"Xcnlby GTpzp", type text}, {"npdTb bp", type text}, {"PTpdzBt GTpzp", type text}, {"PpwTT Szppby", type text}, {"zblt STTlcb bp", type text}, {"TpldTnlB", type text}, {"BpnnTTBlcb PTTBcztlpb", type text}, {"XcBtpTy BpdT", type text}, {"DctT DTspctBhTd", type text}, {"DTspctBhTd Tp", Int64.Type}, {"WcTThpzsT DTspctBhTd XTpn", type text}, {"DctT pX DTspctBh XTpn WcTThpzsT", type text}, {"DTspctBhTd Tp_1", type text}, {"pTdTT TTXTTTbBT", Int64.Type}, {"StpTcgT bpBctlpb", type text}, {"Bzy Tptcb VcbzT", type number}, {"BzstpnTT Tptcb VcbzT", Int64.Type}, {"XcBtpTy npdTb BpdT", type text}, {"cdnlb cppTpvcb DctT", type text}, {"TbglbTTT cppTpvcb DctT", type text}, {"XcBtpTy cppTpvcb DctT", type text}, {"TSn cppTpvcb DctT", type text}, {"BpnpTTsspT npdTb", type text}, {"BpnpTTsspT STTlcb bp", type text}, {"zblt PzTBhcsTd XTpn", type text}, {"lbvplBT DctT", type text}, {"lbstcbbctlpb DctT", type text}, {"XclbzTT DctT", type text}, {"TxtTbdTd WcTTcbty", type text}, {"bcbpzT Bpst lbBbzdTd", type text}, {"Dcys slbBT lbst.", Int64.Type}, {"Dcys slbBT Xclb", Int64.Type}, {"XclbzTT BctTgpTy", type text}, {"DTtclbs pX XclbzTT", type text}, {"Tbgblsh TTcbsbctlpb", type text}, {"TbtTy DctT", type text}, {"Szbnlsslpb DctT", type text}, {"Szbnlsslpb TlnT", type text}, {"SzbnlttTd By", type text}, {"Stctzs", type text}, {"TTcspb BpdT", type text}, {"BpnnTbts", type text}, {"npdlXlTd By", type text}, {"npdlXlTd DctT", type text}, {"TTXTT Tp", type text}, {"PcTt bznbTT", type text}, {"PcTt DTsBTlptlpb", type text}, {"PcTt DTsBTlptlpb pthTT", type text}, {"PcTt Qzcbtlty", Int64.Type}, {"ScbTs BpbXlTnctlpb bznbTT", Int64.Type}, {"HcPT tp DTspctBh?", type text}, {"bcbpzT cbbpwcbBT", type number}, {"zblt Bzy PTlBT", type number}, {"blbT Bzy PTlBT", type number}, {"zblt BzstpnTT PTlBT", type number}, {"blbT BzstpnTT PTlBT", type number}, {"Bzst BpbtcBt", type text}, {"Bzst Ph", type text}, {"Bzst bcnT", type text}, {"Bzst cdd 4", type text}, {"Bzst cdd 1", type text}, {"Bzst Blty", type text}, {"Bzst TTg", type text}, {"Bzst Ppst BpdT", type text}, {"Bzst BpzbtTy", type text}, {"lbst BpbtcBt", type text}, {"lbst Ph", type text}, {"lbst bcnT", type text}, {"lbst cdd 4", type text}, {"lbst cdd 1", type text}, {"lbst Blty", type text}, {"lbst TTg", type text}, {"lbst Ppst BpdT", type text}, {"lbst BpzbtTy", type text}, {"XcBtpTy DTspctBh DctT", type text}, {"DlXXTTTbBT bTtwTTb XcBtpTy DTspctBh DctT tp XclbzTT DctT", Int64.Type}, {"WcTThpzsT DTspctBh DctT", type text}, {"DlXXTTTbBT bTtwTTb WcTThpzsT DTspctBh DctT tp XclbzTT DctT", Int64.Type}, {"TxBTTdTd WcTTcbty", type text}, {"ScXTty lsszT", type text}, {"", type text}})
in
#"Changed Type1"- PierreL691 year agoHelper IV
Victory it works, so what differ between what I did and what you did is the encoding number you used "1201"
Could you explain me how you selected this "encoding system" ?