Forum Discussion
andersbegde
Nov 11, 2020Copper Contributor
Importing XML into ExCel with PowerQuery, encoding not working.
Hi! I have a pretty big XML file, in which the encoding is UTF-8. There's a lot of occurences of special characters (æ,ø,å), which after import only shows up as as questionmark "boxes". Usual...
- Nov 11, 2020
andersbegde SergeiBaklan NikolinoDE
I've tried NikolinoDE 's solution and it works.
What I did step by step was:
1. Open the file in Notepad++
2. Hit the "Encoding" tab and select "Convert to UTF-8-BOM".
3. Save as separate file (doesn't matter I guess but I wanted to keep the other as backup).
4. Open excel and import it normally via Data->Import From File (XML).
Worked exactly as expected.
Thanks for the replies both NikolinoDE and SergeiBaklan
SergeiBaklan
Nov 11, 2020Diamond Contributor
Both Xml.Tables() and Xml.Document() have optional encoding parameter (second and third accordingly), you may add it in formula bar.
https://docs.microsoft.com/en-us/powerquery-m/xml-tables
https://docs.microsoft.com/en-us/powerquery-m/xml-document