Missing Data when using a SQL query on an Excel Spreadsheet
Posted on 2002-04-30
I am querying an Excel spreadsheet for stock information but the data being returned is inconsistent, can anyone help?
The excel spreadsheet is set up so that all the cells are text format, but some contain numbers (textual numbers I assume) and some contain strings.
When I query the database, all the cells containing just strings are being returned ok, but anything with a (textual) number can sometimes be returned as a null, although not very consistently.
I use GetRows to dump the query to excel in an array then loop through the array inserting it into the database.
I keep getting errors saying the Insert SQL is incorrect and it is usually becasue a field that should have been returned as a number from the Excel spreadsheet has returned nothing (even though there is actually a number in the excel spreadsheet!)
If anyone has dealt with this kind of thing any tips would be greatly appreciated.