Gustav Brock
Gustav at cactus.dk
Thu Jan 19 11:44:06 CST 2006
Hi John You miss the Excel header. Two options exist: SELECT NameOfField1, NameOfField2 FROM [Range] AS T IN '' [Excel 5.0;DATABASE=c:\windows\temp\some.xls;]; In the second syntax the trick is the brackets. They can be omitted in this example but are mandatory if you deal with filenames containing spaces. This should be changed to: SELECT NameOfFiels1, NameOfField2 FROM [Excel 5.0;DATABASE=c:\windows\temp\some.xls;HDR=YES].[Range] AS T; >>> jwcolby at ColbyConsulting.com 19-01-2006 18:14:42 >>> Does anyone know the syntax in an SQL statement for seeing a named range in an excel spreadsheet? I have a spreadsheet DocumentRequestTemplate.xls, which has a sheet xlsReqForDocuments which has a named range Sec_DocWithHdr, Sec_DocNoHdr etc. I assume that the syntax would look something like SELECT * from SEC_DocWithHdr IN DocumentRequestTemplate.xls Doing this gets me "unrecognized database format" however. Anyone know what the real answer is? John W. Colby www.ColbyConsulting.com