使用PowerQuery删除指定的字符(比如空格)

  • A+
所属分类:Excel基础知识
(text as text, optional char_to_trim as text) =>

let

char = if char_to_trim = null then " " else char_to_trim,

split = Text.Split(text, char),

removeblanks = List.Select(split, each _ <> ""),

result=Text.Combine(removeblanks, char)

in

result
  • 公众号:i95556
  • 计算机二级考生请关注
  • weinxin
  • 公众号:word_excel_ppt
  • 学习OFFICE请关注
  • weinxin
iexcel

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: