Excel OLEDB problem...

  • Thread starter Thread starter Terry Mulvany
  • Start date Start date
T

Terry Mulvany

Hi,
I have .NET code that uses Microsoft.Jet.OLEDB.4.0 to create Excel
worksheets of data. The end result is that we get an Excel Worksheet with
columns (both header and individual rows) that have alpha-numeric data
prefixed by a single quote (').

When I open a blank worksheet and enter data in this manner (prefaced by a
single quote) it appears that this is a symbol to tells Excel to 'format
numbers as text'.
Does anyone know how to insert data into Excel sheets via OLEDB such that
data is NOT prefaced with these single quotes?

Note: The table (sheet) is being created via standard CREATE TABLE and the
columns are of type char(100) or char(255).

Thank you.
 
Char or Text data types specify a text field. Try using the appropriate
numeric data type instead (Jet SQL help lists 12 numeric options, I think)
 
George said:
Try using the appropriate
numeric data type instead (Jet SQL help lists 12 numeric options, I
think)

However, the Excel ISAM only supports one numeric data type, being
FLOAT (Double). LOGICAL (YesNo), DATETIME and CURRENCY are also
supported for Excel but are not considered to be numeric data types,
AFAIK.

Jamie.

--
 
Back
Top