View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
onedaywhen[_2_] onedaywhen[_2_] is offline
external usenet poster
 
Posts: 74
Default Using Jet to read excel file returns blank for last cell - som

Let's use your data as an example of how a 'mixed types' situation can
easily arise. If you do as I have just done i.e. import your data from
the text of your post into a new clean workbook, you'll see that column
'Beg' is seen as numeric i.e. Double (FLOAT) when queried. Change the
last value in the column from 168 to '168 (the leading single quote
designates it as text). Without IMEX=1 in the connection string, the
column will still be seen as numeric because the majority is numeric
and the '168 will now be null because it is text i.e. not the majority
type. Now format the whole column using the 'Text' number format and
re-query: it has made no difference, the majority type is still seen as
numeric. Now restore the General format and remove the quote from the
168 value. Again, no difference, the value is still seen as text and
being in the minority will query as null. So you now have a column
where all the formats *and* values appear to be numeric yet one value
is seen by Jet as text.

Jamie.

--