Thursday, February 17, 2005

csvFiles .net connection strings

Hello ,
I have encountered problems with .net string with excel files.
Personally I think this is a bad problem that MS doesn't care much
about.

I have a question about using .net to access excel data.

I want to do this using the connection string like:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Book1.xls;Extended Properties="Excel 8.0;HDR=YES;

and the command "select * from [Sheet1$]"

However when I do this, if a column has a mixture of number and
alphanumeric records, it Only gets the numeric records.

Like if you have in column A

141
142
143
144
145
146
147
148
14B
ABC

The datatable is only populated with the numbers, because the
provider thinks its being "smart" and assuming the top are number
fields.

0 Comments:

Post a Comment

<< Home