Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
amars
Specialist
Specialist

Issue with deploying code reading multitab excel

Hi all,

I have few excel files with multiple tabs. The tab names are not consistent and can change over time but the format of the tabs is same.

Thus when reading multiple tabs I am using the below code

For Each vFile in FileList('$(vFolder_FileFormat)')

     ODBC CONNECT32 To [Excel Files;DBQ=$(vFile)];

     Sheets:

     SQLTABLES;

     DISCONNECT;

     For i = 0 To NoOfRows('Sheets')-1

        Let zSheet = Peek('TABLE_NAME', i, 'Sheets');

  Data:

  LOAD

  *

  FROM [$(vFile)]

  (biff, embedded labels, table is $(zSheet));

     Next

  

  Drop Table Sheets;

Next

Now since our Qlikview server doesn't have a Excel installed the line "ODBC CONNECT32 To [Excel Files;DBQ=$(vFile)];" is giving me error.

Is there any way to just install Excel drivers and make the code work without installing microsoft office?

Kindly suggest. Many Thanks in advance.

Regards

Amar

12 Replies
tamilarasu
Champion
Champion

Seems you haven't create a ODBC connection. Check the below link for details.

Connection error to the server

amars
Specialist
Specialist
Author

Hi Julisy,

Try

ODBC CONNECT To [Excel Files;DBQ=$(vArchivo)];

Also make sure the variable $(vArchivo) contains valid Excel File Name.

Also you can test by creating an ODBC connection in Qlikview for a sample file by going to Edit Script

Data Tab -> ODBC -> Click Connect.

On the Connect To Data Source Window -> Select Show User DSNs

The "Excel Files" Data should appear in the windows -> Select "Excel Files" and Click Ok.

Then Select the Sample Excel file for which you wish to set up the connection. Click Ok.

If the "Excel Files" Data source is not appearing in the window when the "Show User DSNs" is selected, then go to ODBC -> User DSNs -> Click Add -> Select Microsoft Excel Drivers(*.xls, .....) -> Click Finish.

In the Next window -> put Data Source Name as "Excel Files".

After the above step it should work. Thanks....

Not applicable

Hi, people.

Already i solved this problem. my problem was not of driver. the problem is the connection string use the DSN Excel Files and i didn't have created in my odbc list of drivers.

From i created in the list odbc drivers; it work correctly.

See images hereFoto.PNG