Jan 05 2018
03:53 PM
- last edited on
Jul 12 2019
11:00 AM
by
TechCommunityAP
Jan 05 2018
03:53 PM
- last edited on
Jul 12 2019
11:00 AM
by
TechCommunityAP
Excel 2010, Power Query version 2.48.4792.941 32-bit.
I have a table (call it Table_Source) in an Excel file (call it source.xlsm) that I query from another Excel file (call it destination.xlsm). The source table contains multiple columns, some formatted as text, some formatted as general.
In destination.xlsm, I use Power Query to query Table_Source. Some of the queried columns are written into destination.xlsm with a leading apostrophe in each cell, even though the columns are formatted as text. This wreaks havoc with some VBA code.
How do I get Power Query to not append the leading apostrophe?
Thank you!
Dec 09 2019 06:12 AM
Dec 09 2019 07:38 AM
Dec 28 2023 11:40 AM
Dec 28 2023 11:16 PM
Trim will remove leading and trailing white spaces only
You can alter the generated step to remove leading and trailing apostrophe(s) (or other char)
Ex. step to Trim leading & trailing space(s):
Edit that step in the formula bar with:
= Table.TransformColumns(#"Changed Type",{{"A", each Text.Trim(_, "'"), type text}})