Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
vchuprina
Specialist
Specialist

ODBC connection issue

Hi Guys,

I start working at new computer and have an issue with OBDC connection.

When I load files I get following issue "External table is not in the expected format".

Usually I use following code to make connection:

For Each vFile in FileList('$(vPath)\*xlsx')

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

   // Read list of sheets

  Temp_Tables:

  sqltables;

Also I installed ODBC driver from microsoft site, but problem still exist.

How can I solve this problem

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").
7 Replies
petter
Partner - Champion III
Partner - Champion III

Are you sure that all the XLSX-files really are in XLSX-format? There could be corrupt files you know. Have you checked if this error message comes up with any or all of files?

swuehl
MVP
MVP

I assume you also created a User or System DSN using the ODBC Administrator (Edit script -> Tools -> ODBC Administrator xx Bit)?

vchuprina
Specialist
Specialist
Author

Hi Petter,

I know such issue, so I check files and can confirm that all files are in xlsx format 

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").
vchuprina
Specialist
Specialist
Author

Yes, I created DSN.

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").
JoaquinLazaro
Partner - Specialist II
Partner - Specialist II

Hi VChuprina:

I don't use ODBC for importing excel files

XLS_File:

LOAD *

FROM

$(vDir)MyFile.xlsx

(ooxml, embedded labels);

Hope it helps,

Joaquín

petter
Partner - Champion III
Partner - Champion III

You haven't got a period between filename and extension, could that create a problem for you?

          For Each vFile in FileList('$(vPath)\*xlsx')


Should be


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

Colin-Albert

It may help to add a trace command on $(vFile) so you can see what file is being processed in the logfile.

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

trace  ......Processing $(vFile) ;

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

   // Read list of sheets

  Temp_Tables:

  sqltables;