1

I am reading a few excel spreadsheets into a dataset via an OLEDB connection. I have had problems with mixed datatypes (specifically columns with number values and numbers mixed with text, ie ####### and ##abc##)

I have tried the solution suggested in this question OleDB & mixed Excel datatypes : missing data

However after further research it seems that both TypeGuessRows=0 and ImportMixedTypes=Text do nothing in the connection string as they are always taken from the registry, which for this solution I cannot edit.

The only reason the above solution works is by setting no header (HDR=NO) so that any file with a header would always set all columns to text type.

The file I am trying to process does have mixed datatypes and it does not have a header row. Does anyone know a solution to set the OLEDBDataAdapter to read all columns as text type?

Community
  • 1
  • 1
Damien
  • 11
  • 1
  • What language are you writing this in, and where? Is it a macro, a .NET app? If you post some code we may be able to help. – Sid Holland Nov 16 '12 at 17:03

0 Answers0