Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good day,
I have the following Excel file:
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;
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 ?
hi,
try with square brackets:
LOAD [ACCESS],
[User] AS [USERID],
Pwd AS [PASSWORD]
FROM
access.xls
(biff, embedded labels, table is Access$);
It doesn't work either.
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
> 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.
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.
looks you need check on file opening on document properties> opening