5 Replies Latest reply: Oct 21, 2016 9:02 AM by David Bockol RSS

    Add Multiple Excel Files

    David Bockol

      How do I add multiple excel files.  I first clicked File, New and then completed a wizard that added my first excel file in the Main tab.  I  clicked File, Edit Script, Table Files and completed the next wizard.  I don't see two separate tables.

        • Re: Add Multiple Excel Files
          Fer Fer

          Hi David

           

          LET MODELED_Folder = 'C:\Excel_Varios_QV\'; 

           

          For Each vFile in FileList('$(MODELED_Folder)*.xlsx')

           

             

            ODBC CONNECT64 TO [Excel Files;DBQ=$(vFile)];

            Tabla_Excel:

            SQLTABLES;

            DISCONNECT;

          LET vRows = NoOfRows('Tabla_Excel');

             

           

              FOR i = 0 TO $(vRows)-1;

           

                        LET vSheet = SubField(Peek('TABLE_NAME',i, 'Tabla_Excel'),'$',1);

                   

                           [sumary]: LOAD 

                               '$(vSheet)' AS [Tab Name],

                               *,

                               '$(vFile)' AS Ruta_Archivo                  

                              

                          From [$(vFile)]  

                         (ooxml, embedded labels, table is '$(vSheet)');

                    

           

           

                  Next;

                DROP Table Tabla_Excel;

          Next;

            • Re: Add Multiple Excel Files
              David Bockol

              I am a new qlikview user, so I tried the following script which I took directly from a qlikview tutorial.  The script imports the first excel file, but doesn't seem to recognize the second excel file in the table viewer.

               

              T1_Active:
              LOAD [Entity Status],
              [Policy Type],
              [Profession Flag],
              [Customer No],
              [Account No],
              [Original Eff Date],
              [Policy Eff Date],
              [Termin Date],
              [Student Flag],
              [Source Code],
              [State Code],
              [Base Premium]
              FROM
              Active.xlsx
              (
              ooxml, embedded labels, table is Active);

              T2_Term:
              LOAD [Entity Status],
              [Policy Type],
              [Profession Flag],
              [Customer No],
              [Account No],
              [Original Eff Date],
              [Policy Eff Date],
              [Termin Date],
              [Student Flag],
              [Source Code],
              [State Code],
              [Base Premium]
              FROM
              Term.xlsx
              (
              ooxml, embedded labels, table is Term);