LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel data numeric type read problem

Hi guys,

I use Oledb driver read content from a excel spread sheet to my
dataset . I have a column in excel file contains only numbers (no
mixed type). The problem is that if the number is very long, like
1234567.1, there is a chance I get something like 1234567.1000001 in
dataset. But for shorter number, it is all fine.

I am using .net framework 1.1. The code is like this:

string connString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;
DATA SOURCE='t.xls';Extended Properties=\"Excel 8.0;HDR=1;IMEX=1\"";
OleDbConnection myConn = new OleDbConnection(connString);
OleDbDataAdapter adapter = new OleDbDataAdapter("select *
from [sheet1$]", myConn);
DataSet ds = new DataSet();
adapter.Fill(ds);

Please help. Thanks in advance.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel data numeric type read problem [email protected] Excel Programming 0 April 25th 07 03:37 AM
Excel problem reading data when aflanumreic field is numeric Verhaad Excel Programming 0 March 19th 07 09:43 AM
Problem pasting numeric data from Access into Excel JP Jones Excel Discussion (Misc queries) 8 July 14th 05 03:26 PM
Converting text data type to numeric Marilyn Excel Programming 0 October 14th 04 04:27 PM
Excel VBA - Data Type Conversion problem PaulC Excel Programming 3 May 10th 04 04:53 PM


All times are GMT +1. The time now is 06:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"