excelreplacepowerquerytransformm

How to wrap text in quotes using powerQuery?


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"})

Solution

  • try

    #"AddQuotes" = Table.TransformColumns(#"Renamed Columns",{{"FileName",each """" & _ & """", type text}})