Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 vchuprina
		
			vchuprina
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
 petter
		
			petter
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I assume you also created a User or System DSN using the ODBC Administrator (Edit script -> Tools -> ODBC Administrator xx Bit)?
 vchuprina
		
			vchuprina
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Petter,
I know such issue, so I check files and can confirm that all files are in xlsx format
 vchuprina
		
			vchuprina
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Yes, I created DSN.
 
					
				
		
 Joaquin_Lazaro
		
			Joaquin_Lazaro
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
		
			petter
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
		
			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;
