Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Prabhu1204
Creator
Creator

Trim Function

Hello 

Could you please clear how trim works.

I have a values in excel like below

 

Prabhu1204_0-1589363558171.png

When i loaded the excel in Qlivkiew, i am not getting the text with leading spaces.

Prabhu1204_1-1589363689248.png

For example in my excel the second column apple has leading spaces. why doesnt it shoes in qlivkiew? there is no rim used inside script

Why so ?

 

-Prabhu
Labels (1)
2 Solutions

Accepted Solutions
dplr-rn
Partner - Master III
Partner - Master III

qlik automatically trims leading and trailing spaces.

if you dont want qlik to do so you can specify using a system  variable

set Verbatim = 1;

refer to below

https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/Syste...

 

View solution in original post

fosuzuki
Partner - Specialist III
Partner - Specialist III

"Normally all field values are automatically stripped of leading and trailing blanks (ASCII 32) and tabs (ASCII 9) before being loaded into the QlikView database. Setting this variable to 1 suspends the stripping of blanks and tabs. Hard space (ANSI 160) is never stripped."

https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/Syste...

So try putting this in your script:

set Verbatim = 1;

View solution in original post

2 Replies
dplr-rn
Partner - Master III
Partner - Master III

qlik automatically trims leading and trailing spaces.

if you dont want qlik to do so you can specify using a system  variable

set Verbatim = 1;

refer to below

https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/Syste...

 

fosuzuki
Partner - Specialist III
Partner - Specialist III

"Normally all field values are automatically stripped of leading and trailing blanks (ASCII 32) and tabs (ASCII 9) before being loaded into the QlikView database. Setting this variable to 1 suspends the stripping of blanks and tabs. Hard space (ANSI 160) is never stripped."

https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/Syste...

So try putting this in your script:

set Verbatim = 1;