View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.office.developer.vba
Cindy M -WordMVP- Cindy M  -WordMVP- is offline
external usenet poster
 
Posts: 5
Default Excel as an OLE DB consumer

How can I best simulate Excel as an OLE DB consumer?

I would like to be able to write an app using ADO or ? to reproduce a
data retrieval problem I'm having with a custom OLE DB provider app.

The app behaves much like the MS SQL OLEDB provider.
Data access from ADO and the custom client works fine.

But data access from Excel is not working. The string data is not being
shown. I would like to be able to repro this by writing an OLE DB
consumer that exhibits the same behviour as Excel.

The OLE DB provider used for Excel is actually that of the JET engine.
And it uses Excel's ODBC driver for the connection. The ODBC driver
performs a check on the first eight rows (by default, this can be
configured) of each column to determine the data type for the column. If
it decides it's numeric, strings aren't shown. If it decides it's a
string, numbers don't come through. So you need to explicitly type the
columns in the Excel spreadsheet (best through the Data/Text to columns
wizard).

If that's not the problem you're seeing, then please explain the problem
in more detail.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)