Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Antoine553
Contributor II
Contributor II

field with space before text not found

Hello,

I'm working on a script to load all the files in a folder into a single table (same data in all files with same headers). However I have a problem with one of my filed wich start with a space.

When I try to load it like :

 

Load

" IMMAT" as Immatriculation

field2 as fieldblabla

etc ...

 

 

I always get an error : field " IMMAT" not found.

I can't modify the header and delete the space since all the futures files will arrive with the same name so I'm stuck with it. Can someone explain why it is not accepting it and how to correct that pls ?

Labels (1)
1 Solution

Accepted Solutions
eddie_wagt
Partner - Creator III
Partner - Creator III

Hello Antoine553,

I believe you can use this as load statement, because Qlik use automatically a trim on the fieldname.

 

LOAD 

IMMAT as Immatriculation

etc...

 

Otherwise if fails, you can use before your load statement this

SET Verbatim = 1; 

 

Did not test it though. 

View solution in original post

2 Replies
eddie_wagt
Partner - Creator III
Partner - Creator III

Hello Antoine553,

I believe you can use this as load statement, because Qlik use automatically a trim on the fieldname.

 

LOAD 

IMMAT as Immatriculation

etc...

 

Otherwise if fails, you can use before your load statement this

SET Verbatim = 1; 

 

Did not test it though. 

MayilVahanan

Hi Antoine,

Might be one of the excel file doesn't  have spaces in front.
For testing purpose, can you use 

Load * from ursource;
And check how the field name (either with space or without space) or few file contains without spaces or not.
From that, you can proceed further.

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