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: 
Not applicable

Section access from Excel file

Good day,

I have the following Excel file:

2011-10-27_144903.png

If I create a section access with the following code, it doesn't work:

Section Access;

Directory;

LOAD [ACCESS],

     User AS [USERID],

     Pwd AS [PASSWORD]

FROM

access.xls

(biff, embedded labels, table is Access$);

   Section Application;

2011-10-27_145133.png

If I rename the fields in my Excel file, it works.

So I guess it's the "AS" expression that isn't accepted in the section access.

If I don't use the "embedded labels"

(biff, no labels, header is 1 lines, table is Acces$);

and use "@1 AS USERID, @2 AS PASSWORD", it works.

Why can't I use embedded labels and rename fields (using "AS" ) in the section access ?

6 Replies
Not applicable
Author

hi,

try with square brackets:

LOAD [ACCESS],
     [User] AS [USERID],
     Pwd AS [PASSWORD]
FROM
access.xls
(biff, embedded labels, table is Access$);

Not applicable
Author

It doesn't work either.

Anonymous
Not applicable
Author

Nicolas,

I don't see a reason for this problem, except a possibility that there is a space in Excel after User, like this: 'User '.  Loading into the section access is not different from any other data load.

And, an advice - to make sure your section access works, use upper() function for all fields, e.g.:

upper(User) as USERID

Not applicable
Author

> a possibility that there is a space in Excel after User

There is no extra space.

> to make sure your section access works, use upper() function for all fields

I'm used to it, but for this simple exemple, I wrote the simpliest code to be easily understood.

Anonymous
Not applicable
Author

Looks like I'm wrong - load works differently if it is "section access"  - You must have headers in upper case in Excel file: USER, PWD.

Not applicable
Author

looks you need check on file opening on document properties> opening