1 Reply Latest reply: Nov 29, 2011 1:47 PM by Fernando Suzuki RSS

    For loop while reading from Excel file

      Hello Everyone,

      I  am new to qlikview. I have a question for which I couldn't find a solution.

      Can someone help me?

       

      The problem statement is:

      I have a folder in a FTP server, which contains excel files. More specifically every quarter there will be a new file with the "year-quarter" as the file name.

      Again every file has 3 sheets.

       

      My tasks is to read all the excel files, and store the data from sheet1 from all excel file in a qvd. And this has to repeat for sheet2 & sheet 3 as well.

       

      Thanks,

      Spandana

        • For loop while reading from Excel file
          Fernando Suzuki

          Hi Spandana,

           

          this should be very straighforward when doing it with QlikView, as long as every file has the same internal structure:

           

          LOAD *

          FROM FilePath\*.xlsx (ooxml, embedded labels, table is Sheet1);

           

          LOAD *

          FROM FilePath\*.xlsx (ooxml, embedded labels, table is Sheet2);

           

          LOAD *

          FROM FilePath\*.xlsx (ooxml, embedded labels, table is Sheet3);

           

           

          The first load statement will get the data from the Sheet1 from all files. The second from the Sheet2, and so on. If all files / sheets have the same data structure, QlikView will automagically concatenate the data in the same table.

           

           

          Hope this helps you.

          Regards,

          Fernando