Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
jennytan
Contributor II
Contributor II

How can I remove non-printable characters from a cell in Qlikview

How can I remove non-printable characters from a cell which has 2 lines of data.  I tried trim but it does not work

7 Replies
marcus_sommer

If a char isn't fetched by the trim-function you could apply keepchar/purgechar() to include respectively to exclude all (un)wanted chars.

- Marcus

jennytan
Contributor II
Contributor II
Author

Hello Marcus,



Thank you. The purgechar helped to remove the unwanted characters caused by the 'enter key'. However, it also removed all empty space between words. Any suggestion to keep the spacing between words and at the same remove the unwanted characters.



I used purgechar(Address, ' ') as Address1



Result is blk315tAMPINESSTREET33#12-40singapore520315


Brett_Bleess
Former Employee
Former Employee

@marcus_sommer  Hey Marcus, apologies for the notification issues we seem to be having, just wanted to let you know about this one, as I suspect you will have something additional, I am not quite sure where to head with it.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
marcus_sommer

If purgechar() with excluding just a normal space respectively chr(32) worked it should also work with trim(). Therefore I think that there is no extra special char which caused the two lines of data else there isn't enough space within the cell and so the content is just shown on multiple lines without including any line-break chars.

To make sure which chars are really there it's often helpful to copy & paste the content into an editor like notepad++.

- Marcus

jennytan
Contributor II
Contributor II
Author

Hello Marcus,

Thanks for the assistance.  Now I used the trim function and it shows correctly both for csv and xls.  However, when I copied the values to notepad, I noticed that it had the " both at the beginning and end of the field.

Please see sample attached.

 

 

 

marcus_sommer

It looked like a quoting - means the wrapping of a fieldvalue with a certain char which shouldn't be included within the values itself to ensure that other tools could exactly differ between fieldvalues, field-delimiters and record-delimiters.

Quite usual for this quoting is the use of the double-quotes and of course you could see them within an editor. If there is no issue within your following tools / process-chain in loading/interpreting the data you don't need to care about it.

- Marcus

jennytan
Contributor II
Contributor II
Author

Marcus,

Thank you.