Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Trim Excel Column Data

Dear Folks,

I have a scenario , where i need to perform cleansing on an excel column.

I believe Location columns contain spaces in it , but when i perform trim, purgechar operations. It fails to remove the spaces.

Have attached the sample files.

Regards,

Vasim

4 Replies
MayilVahanan

HI

Try like this

KeepChar(Trim(Location),'ABCDEFGHIJKLMNOPQRSTUVWXYZ') as Location,

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Use PurgeChar(Location, chr(32) & chr(160))

In location files, sometimes it is used the ascii 160 as space.

tresesco
MVP
MVP

As said by Juan, this is because of non-breaking space character represented by ascii 160. So the following should work for you:

Purgechar(Location, chr(160)) as NewLocation.

Not applicable
Author

Thanks a lot mayil, juan and tresesco.

I managed to get rid of non breaking space by using Purgechar(Location, chr(160)).