7 Replies Latest reply: Aug 22, 2014 2:46 AM by Jonathan Dienst RSS

    Connection for excel file

      Hello,

       

      I have excel file with different sheets in the file. I need to read all the sheets in the excel, so I am using below script:

       

       

      CONNECT TO [Provider=Microsoft.Jet.OLEDB.4.0;Data Source=..\QVD\TP_AZ.xls;Extended Properties="Excel 8.0;"];

      SQLtables;

      DISCONNECT;     // Don't need ODBC connection anymore

       

      /*

      One of the fields loaded by SQLtables is "TABLE_NAME". This field will contain the sheet name.

      We will loop through this set of sheet names.

      */

      FOR i = 0 to NoOfRows('tables')-1

           LET sheetName = purgeChar(peek('TABLE_NAME', i, 'tables'), chr(39));

       

              LOAD *,  '$(sheetName)' as Sheet

              FROM [..\QVD\TP.xls] (biff, embedded labels, table is [$(sheetName)]);

       

      NEXT

       

       

      above script works fine when I reload the report manually.

       

      But when I schedule the report using qlikview publisher, I am getting below error:

      CONNECT*Provider*

      Error: ErrorSource: Microsoft OLE DB Service Components, ErrorMsg: Class not registered

      General Script Error

      Execution Failed

      Execution finished.

       

      I am unable to undestand why it is failing through publisher.