Forum Discussion
efilipe
Helper IV
7 years agoChanges to file before loading
Hi guys! I'm having a problem on my file. We have mora than 2000 lines of content but, 13 of them, has html code in it. Importing is giving me 13 errors. I'd like to be able make a change o...
stretcharm
Memorable Member
7 years agoDo you get the errors on type convertion?
Try replace the values.
If you still get the error ensure your replace is before the error. You can reorder the steps by clicking and selecting move up or down
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WKk5JLFaK1YlWSoSzTE2MTcCM4pS0lLR0MNPYzLQ4pSgNzI4pNTAwTk4qAtOpJanFJcUQIX2YGNSYlLTi9AygmbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [data = _t]),
#"Replaced Value" = Table.ReplaceValue(Source,"<br>","",Replacer.ReplaceText,{"data"}),
#"Replaced Value1" = Table.ReplaceValue(#"Replaced Value","</br>","",Replacer.ReplaceText,{"data"}),
#"Changed Type" = Table.TransformColumnTypes(#"Replaced Value1",{{"data", type text}})
in
#"Changed Type"If this fails you can also replace errors if you just want to avoid the error.
efilipe
Helper IV
7 years agoYes, because since is has html code, it's importing those 13 fields to the wrong columns. it's like having a line break in the middle of the file 13 times.