1
1SALz
Hi,
I m trying to access an excel spreadsheet to load a named cells in a
dataset. For this, I m using Jet OLEDB provider with ADO.Net.
String cnString = @"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" +
fileName + "; Extended Properties=\"Excel 8.0;HDR=No;IMEX=1;\"";
String sql = "select * from MyNamedCells";
Initially I was having problem with null values for certain cells where
datatype appeared different to the provider. e.g. If a top cells of a
column contain text data (say A13331123) and in the middle there was some
numeric data (4509015284) .. the numeric data was being retrieved as null.
This was fixed using IMEX switch.
Now - althought the numeric data is being loaded, but it is coming in
scientific notation (the above value converts to: 4.50902e+009).
How can I get my text back with the right accuracy?
Thanks.
I m trying to access an excel spreadsheet to load a named cells in a
dataset. For this, I m using Jet OLEDB provider with ADO.Net.
String cnString = @"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" +
fileName + "; Extended Properties=\"Excel 8.0;HDR=No;IMEX=1;\"";
String sql = "select * from MyNamedCells";
Initially I was having problem with null values for certain cells where
datatype appeared different to the provider. e.g. If a top cells of a
column contain text data (say A13331123) and in the middle there was some
numeric data (4509015284) .. the numeric data was being retrieved as null.
This was fixed using IMEX switch.
Now - althought the numeric data is being loaded, but it is coming in
scientific notation (the above value converts to: 4.50902e+009).
How can I get my text back with the right accuracy?
Thanks.