HI Dave
thanks for that.
A slight problem (for me ) is that returns the first row of the spreadsheet as column names.
Also I'd like to drop it into a pre existing massaging process that expects columns a,b,c, etc
Maybe I should automate saving it as the correct version in excel
Thanks
Nick
>Nick,
>
>Look at using ODBC to get around the issues VFP has importing from newer Excel versions:
>
>
>lnSQLHand = SQLSTRINGCONNECT( "Driver={Microsoft Excel Driver (*.xls)};DBQ=" + lcFilename )
>SQLEXEC( lnSQLHand, [Select * FROM "Sheet1$"], "TheSheet" )
>
>
>You don't necessarily get back the correctly typed columns but it's not too painful to use another SQL statement to coerce the datatypes around to what you are needing.
>
>>I have a problem with users trying to import spreadsheets saved in the wrong version of excel.
>>
>>Is there any way I can detect the version of excel the spreadsheet has been saved in so I can retunr a bettre error/warning message.