Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ingoniclas
Creator II
Creator II

For Each File in Filelist - FTP load not working in QV12?

Hi experts,

up until recently I used the following script successfully to pull data from xlsx-files into my QV app (taken from the thread Re: For Each File in Filelist - FTP load is not working?). This worked fine with QV11, and also with the first edition of QV12, but for some reason it doesn't work with QlikView November 2017 SR5, Version 12.20.20600.0. I always get the error mesage "Unknown LOAD statment error" for the first LOAD statement (see below). Does anybody know what needs to be changed so it works again?

////////////Connectig only Directory listing through WebFiles Button,
///////////then split Directory listing into 4 Section Date = F1, Time = F2, Type of File/Directory = F3, Name of File or Directory = F4
LOADER:
LOAD F1,
F2,
F3,
F4
FROM
[ftp://username: pass%40word@kolkataivf.net]
(
html, codepage is 1252, embedded labels, table is @1, filters(
ColSplit(1, IntArray(11, 24, 34))
))
Where right(F4,4)='xlsx';

let vRow = NoOfRows('LOADER');     ////// Checking No of Rows for xlsx files

For i = 0 to $(vRow)-1
let vFile = peek('F4',-1+$(i),'LOADER'); ////// Remember if All file structures are same then you can execute this script and Last Row started with ‘-1’

LOAD COMPANY,
CEO_NAME,
ADDRESS1,
CITY,
PIN,
EMAIL
FROM
[ftp://username: pass%40word@kolkataivf.net/$(vFile)]  
/////Now Concatenating File with Connection Bec’z for each file transfer FTP require new connection  
(
ooxml, embedded labels, table is Sheet1);

Next i

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

QV12.10+ changed the library used for web access, that may be your issue.  You can try the old library by setting:

WebFileUseWinAPI = 1

You can set this via the easter egg or in the settings.ini file.

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

http://www.easyqlik.com

View solution in original post

8 Replies
marcus_sommer

Just for testings and before assuming any new bug I would apply a process of elimination and commenting the loop-part and then removing the filters() statement and the where-clause of the first load. If there is further this error I would create the load-statement again with the file-wizard to check if the fileformat, charset and/or the table has changed or if you maybe get another error-message or further hints what might be wrong.

- Marcus

ingoniclas
Creator II
Creator II
Author

Hi Markus,

I am not saying the it's a "bug", but I did try to connect with the web file wizard (no loop, no filters, no other pre-conditions whatsover) which works great with QV11, but not with the latest edition of QV12 - Only with QV12 I get the message "Login denied". Any ideas why this is?

Cheers,

Ingo

marcus_sommer

I think you are one step further with this new error-message and "Login denied" seems not directly related to the load-statement itself else it hints to an access-rights issue. Are you sure that the used User+Password is really correct? Could you access this file with the used credentials from the same machine per windows-explorer?

- Marcus

balabhaskarqlik

ingoniclas
Creator II
Creator II
Author

Yes Marcus. I can access the exact same root directory with QV11, but not QV12! I can also access it with Filezilla, no problems with the access! I am really puzzled!

ingoniclas
Creator II
Creator II
Author

Thanks for link, however, this doest seem to be the issue. I did delete the settings.ini as dicussed in the threads but it didn't make a difference. In addition not tmep files are redirected to a network folder as indidcated in threads.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

QV12.10+ changed the library used for web access, that may be your issue.  You can try the old library by setting:

WebFileUseWinAPI = 1

You can set this via the easter egg or in the settings.ini file.

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

http://www.easyqlik.com

ingoniclas
Creator II
Creator II
Author

That's it! I put it in the Settings.ini, rebooted the machine and it worked! Thank you so much, Rob!