Thread: Excel Driver
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
pk pk is offline
external usenet poster
 
Posts: 27
Default Excel Driver

This may or may not be helpful - my experience:

A built-in limitation of ADO is that it can only pull in
one data type from any given column. It samples the first
few rows and whichever data type is prevalent wins. The
driver then only retrieves that data type from that
column.

So for example, if you have text in your first eight or
ten rows and 30,000 values beneath that, only the text
will be retrieved.

The only solution is to be sure that none of your
critical columns contains mixed types.

I worked around this by:

1. Turn off screen updating
2. Open the source file conventionally - read only
3. Copy the data of choice
4. Close the file without saving changes

This may seem less punchy and cutting edge but, it ALWAYS
works and it's less code intensive.

I have also found ADO to be unstable, due to its driver
dependency. Sometimes it works, then you get new drivers,
and then it quits again. I got tired of supporting it and
switched practically all my code over.

Hope this helps somehow...


-----Original Message-----

I'm currently using the Microsoft ADO excel driver, and
I'm having difficulty setting the data type when I
retrieve the data from file. The automatic type

detecting
feature on the ADO driver is not doing a good job.

Any one know a good driver for reading data from an MS
Excel file? Suggestions please.




.