OleDB Jet - Float issues in reading excel data

Posted by Patrick on Stack Overflow See other posts from Stack Overflow or by Patrick
Published on 2010-04-11T10:34:16Z Indexed on 2010/04/11 10:43 UTC
Read the original article Hit count: 279

Filed under:
|
|
|

When I read a sheet into a DataTable using the OleDbDataReader, floating point numbers loose their precision.

I tried forcing OleDb to read the excel data as string, but although the data is now contained in a DataRow with each Column defined as System.String it looses precision (18.125 -> 18.124962832).

Any idea how to avoid this behaviour?

© Stack Overflow or respective owner

Related posts about excel

Related posts about oledb