3 Replies Latest reply: Nov 6, 2012 3:09 PM by Gerhard Laubscher RSS

    Load from Web

    Gerhard Laubscher

      Hi there,


      I've never loaded from the web before (didn't even see I could before now).


      We have a website where we get daily Fax reports on - each report is available by clicking on the date from a list of all reports (see image).


      If I do the following in QlikView it works fine:


      LOAD *



      (txt, codepage is 1252, embedded labels, delimiter is '~', no quotes);



      Usually, when pulling files from a folder, I would simply change the filename to full_fax_*.txt

      and this will load all files.


      But this is not working - I then get a "field not found" error when trying to load.


      How can I load the entire list of reports on the site? They are alwaus name "full_fax_YYYYMMDD.txt"





        • Re: Load from Web
          whiteline _



          You cann't do it like with folders as in this case QV performs a standart http get request to the URI provided.

          To load the list of files your website should return it.

          Just paste the link that you used to take the screenshot to the load wizard in QV and check.

          • Re: Load from Web
            Vlad Gutkovsky

            Alternatively, since you know there is 1 file per day, you can just create a FOR loop and populate it with calendar days. To make sure it doesn't just error out when a day's files are missing, you would need to set the ErrorMode variable. So something like this:


            SET ErrorMode = 0;


            LET vFirstDate = num(date('01/01/2012')); //change this to anything you like
            LET vLastDate = num(today());


            FOR i='$(vFirstDate)' TO '$(vLastDate)'


                LET vDateVariable = date($(i),'YYYYMMDD');



                LOAD * FROM


                (txt, codepage is 1252, embedded labels, delimiter is '~', no quotes);




            SET ErrorMode = 1;