= Table.FromRows(List.Transform(Table.ColumnNames(Source), each {_, Type.TableColumn(Value.Type(Source),_)}),type table[ColumnName = text,ColumnType = type])
= Table.TransformColumns(Source,{}, each if _ is text then Text.Trim(_) else _)
With that function is simpler to select text type columns for trimming.Actually, Table.Schema is just a friendly way to get column data types.
= Table.TransformColumns(Source, List.Transform(Table.SelectRows(Table.Schema(Source), each [Kind] = "text")[Name], each {_, (val) => Text.Trim(val), type text}))
With that function is simpler to select text type columns for trimming.
Regards,Code:= Table.TransformColumns(Source, List.Transform(Table.SelectRows(Table.Schema(Source), each [Kind] = "text")[Name], each {_, (val) => Text.Trim(val), type text}))
= Table.TransformColumns(Source, List.Transform(Table.SelectRows(Table.Schema(Source), each [Kind] = "text")[Name], each {_, [COLOR=#FF0000][B](val) => Text.Trim(val), type text[/B][/COLOR]}))
= Table.TransformColumns(Source, List.Transform(Table.SelectRows(Table.Schema(Source), each [Kind] = "text")[Name], each {_, [COLOR=#FF0000][B]Text.Trim[/B][/COLOR]}))