2 Replies Latest reply: Jan 2, 2014 5:05 AM by sivasankar kanagasabai RSS

    Autoloading a file

    Roberto Angelucci


      I apologise if this has been answered multiple times, however I am still trying to get to grips with the behind the scenes of Qlikview.

       

      Problem:

      I have a file that is generated into a directory. The directory gets cleaned everytime there is a new file created so that there is only one file in there at any one given time. However the file names changes every time it is created. I need to load this file into qlikview without having to change the code every time. The file format and fields does not change. So an example of files can be:

       

      \\temp\allocation\zzzalldata-2013-12-24.xlsx or

      \\temp\allocation\zzzalldata-2014-01-01.xlsx etc.....

       

      Question:

      Is there a way in Qlikview to load a file from a specified directory without knowing the file name. So I know the directory is \\temp\allocation\. I know that the last part contains a date and I want to extract that from the file name as well, so I know when the file was created. I would hope someone would help me code this.

       

      Current code example:

       

      Directory;

      Load a,

              b,

              c

      FROM

      [temp\allocation\zzzalldata-2013-12-25.xlsx]

      (ooxml,embedded lables, table is [report$]);

       

       

      Thank you very much for your assistance