Skip to main content
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

1 Solution

Accepted Solutions
amars
Specialist
Specialist
Author

Hi all,

Installed the drivers from the below URL

https://www.microsoft.com/en-us/download/confirmation.aspx?id=13255

in User DSN clicked on Add and selected the Microsoft Excel Driver. Named it as "Excel Files" and it worked.

Thanks all.

View solution in original post

12 Replies
settu_periasamy
Master III
Master III

Hi,

Have you tried Single Excel file using ODBC Connection ?

tamilarasu
Champion
Champion

Hi Amars,

You can download and install ODBC drivers from Microsoft site. You don't need to install Microsoft office.

amars
Specialist
Specialist
Author

Hi Settu,

My issue is since the server doesn't have microsoft office, the options to connect to ODBC Excel drivers are not installed. Is there a way to just install Excel ODBC drivers without installing microsoft Office.

Regards

Amar

amars
Specialist
Specialist
Author

Can you suggest any link to install the ODBC drivers? Many Thanks...

jagan
Luminary Alumni
Luminary Alumni

Hi,

You can download ODBC driver from Microsoft website.

check this link for dynamically loading all excel files and sheets

Load all Excel files and all sheets in a folder

Regards,

Jagan.

amars
Specialist
Specialist
Author

Hi all,

Installed the drivers from the below URL

https://www.microsoft.com/en-us/download/confirmation.aspx?id=13255

in User DSN clicked on Add and selected the Microsoft Excel Driver. Named it as "Excel Files" and it worked.

Thanks all.

amars
Specialist
Specialist
Author

Also make sure to user the correct version of installer (32 bit or 64 bit). Accordingly user Connect32 or Connect64 or simply use Connect. Thanks again

Not applicable

Hi peoples,

I have installed the driver but but i'm getting the next error however.

ErrorSource: Microsoft OLE DB Provider for ODBC Drivers, ErrorMsg: [Microsoft][ODBC Driver Manager] Invalid argument value

OLEDB CONNECT TO [Provider=MSDASQL.1;Persist Security Info=False;Extended Properties="DSN=Excel Files;DBQ=\\diqlvsrv\RawData\Files\Cobros\01022016.xls; DriverId=1046; MaxBufferSize=2048; PageTimeout=5";]

I have tryied using the next code:

ODBC CONNECT32 To [Excel Files;DriverId=1046;DBQ=$(vArchivo)];

and the error appear is: the default driver was not specified.