删除电源查询中的非中断 space
remove non breaking space in power query
刚刚遇到一个有趣的问题,即 PQ 没有以相同的方式转换看似相同的数据。
作为示例,我只想将 24 mg/kg bw/day
替换为 Hello
:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
#"Replaced Value" = Table.ReplaceValue(#"Changed Type","24 mg/kg bw/day","Hello",Replacer.ReplaceText,{"Column1"})
in
#"Replaced Value"
我们可以看到有一个实例(红色)不起作用,这是由于换行符造成的。我不确定如何处理这个问题,想知道是否有人 运行 遇到过类似的问题。
数据
24 mg/kg bw/day
24 mg/kg bw/day
24 mg/kg bw/day
添加一个步骤来替换 non-breaking 个空格。
我遇到了类似的问题,斜杠 (/) 与看起来几乎完全相同的 divide-by 符号。
Custom1 = {
Character.FromNumber(32),
Character.FromNumber(160),
Character.FromNumber(5760),
Character.FromNumber(8194),
Character.FromNumber(8195),
Character.FromNumber(8196),
Character.FromNumber(8197),
Character.FromNumber(8198),
Character.FromNumber(8199),
Character.FromNumber(8200),
Character.FromNumber(8201),
Character.FromNumber(8202),
Character.FromNumber(8239),
Character.FromNumber(8287),
Character.FromNumber(12288),
Character.FromNumber(8203)
},
Custom2 = List.Accumulate(Custom1, #"Split Column by Delimiter1", (table, old) => Table.ReplaceValue(table, old," ", Replacer.ReplaceText, {"POD"})),
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Text.Replace([Column1], Character.FromNumber(160), " ")),
#"Replaced Value" = Table.ReplaceValue(#"Added Custom","24 mg/kg bw/day","Hello",Replacer.ReplaceText,{"Custom"})
in
#"Replaced Value"
替换整个table
#"Replaced Value" = Table.ReplaceValue(previous step,"#(00A0)","",Replacer.ReplaceText,Table.ColumnNames(previous step))
在哪里
U+00A0 No-Break Space (NBSP) Unicode 字符
刚刚遇到一个有趣的问题,即 PQ 没有以相同的方式转换看似相同的数据。
作为示例,我只想将 24 mg/kg bw/day
替换为 Hello
:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
#"Replaced Value" = Table.ReplaceValue(#"Changed Type","24 mg/kg bw/day","Hello",Replacer.ReplaceText,{"Column1"})
in
#"Replaced Value"
我们可以看到有一个实例(红色)不起作用,这是由于换行符造成的。我不确定如何处理这个问题,想知道是否有人 运行 遇到过类似的问题。
数据
24 mg/kg bw/day
24 mg/kg bw/day
24 mg/kg bw/day
添加一个步骤来替换 non-breaking 个空格。
我遇到了类似的问题,斜杠 (/) 与看起来几乎完全相同的 divide-by 符号。
Custom1 = {
Character.FromNumber(32),
Character.FromNumber(160),
Character.FromNumber(5760),
Character.FromNumber(8194),
Character.FromNumber(8195),
Character.FromNumber(8196),
Character.FromNumber(8197),
Character.FromNumber(8198),
Character.FromNumber(8199),
Character.FromNumber(8200),
Character.FromNumber(8201),
Character.FromNumber(8202),
Character.FromNumber(8239),
Character.FromNumber(8287),
Character.FromNumber(12288),
Character.FromNumber(8203)
},
Custom2 = List.Accumulate(Custom1, #"Split Column by Delimiter1", (table, old) => Table.ReplaceValue(table, old," ", Replacer.ReplaceText, {"POD"})),
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Text.Replace([Column1], Character.FromNumber(160), " ")),
#"Replaced Value" = Table.ReplaceValue(#"Added Custom","24 mg/kg bw/day","Hello",Replacer.ReplaceText,{"Custom"})
in
#"Replaced Value"
替换整个table
#"Replaced Value" = Table.ReplaceValue(previous step,"#(00A0)","",Replacer.ReplaceText,Table.ColumnNames(previous step))
在哪里 U+00A0 No-Break Space (NBSP) Unicode 字符