Forum Discussion
efilipe
7 years agoHelper IV
Changes 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
7 years agoMemorable Member
Do 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
7 years agoHelper IV
Yes, 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.