admin管理员组文章数量:1406178
I'm trying to replace all values in a column with the same values but in quotes
Examples
Words
words22
to
"Words"
"words22"
I tried doing things like with 'FileName' being the name of the column, but its just looking for the literal string '[Filename]' instead of the value in it.
= Table.ReplaceValue(#"Renamed Columns","[FileName]","""""[FileName]""""",Replacer.ReplaceText,{"FileName"})
I'm trying to replace all values in a column with the same values but in quotes
Examples
Words
words22
to
"Words"
"words22"
I tried doing things like with 'FileName' being the name of the column, but its just looking for the literal string '[Filename]' instead of the value in it.
= Table.ReplaceValue(#"Renamed Columns","[FileName]","""""[FileName]""""",Replacer.ReplaceText,{"FileName"})
Share
Improve this question
edited Mar 6 at 16:35
BigBen
50.2k7 gold badges28 silver badges44 bronze badges
asked Mar 6 at 16:28
Alex KibbeAlex Kibbe
113 bronze badges
2 Answers
Reset to default 1try
#"AddQuotes" = Table.TransformColumns(#"Renamed Columns",{{"FileName",each """" & _ & """", type text}})
You can use Table.ReplaceValue
but with a custom Replacer:
= Table.ReplaceValue(
#"Renamed Columns",
each [FileName],
null,
(x,y,z)as text=>"""" & Text.Trim(y,"""") & """",
{"FileName"})
本文标签: excelHow to wrap text in quotes using powerQueryStack Overflow
版权声明:本文标题:excel - How to wrap text in quotes using powerQuery? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744962555a2634744.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论