2 Replies Latest reply: Jul 4, 2011 5:51 AM by mc22_qlik RSS

    Reading from multiple worksheets using Qlikviews


      SET FilepathName = <input file path>;

      CONNECT TO [Excel Files;DBQ=$(FilepathName)];

      tables:   // Name the table that will be created by SQLTables stmt
      SQLtables;
      DISCONNECT;  // Don't need ODBC connection anymore

      FOR SheetCounter = 0 to NoOfRows('tables')-1
        LET sheetName = purgeChar(peek('TABLE_NAME', SheetCounter, 'tables'), chr(39));
        DataTable:
        LOAD col1,col2,col3   ,   '$(sheetName)' as sheet 

        FROM $(FilepathName) (biff, embedded labels, table is [$(sheetName)]);
       
      NEXT
      DROP Table tables;
      Let rowlimit = NoOfRows(DataTable);

      Table2:
      Load col2,col3 from DataTable;

       

      Getting following error message -


      Cannot open file '<QVworking folder>\DataTable', The operation completed successfully.

      Table2:
      Load col2,col3 from DataTable;

       

      Please help .