Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

excel without formatting in cells

$
0
0

Hello.
I am using somthing like this to import excel to a dataset

("provider=Microsoft.ACE.OLEDB.12.0;Data Source='" + TextBox1.Text + "';Extended Properties=""Excel 8.0;IMEX=1""")

This has an issue that on some cells it cut's down the complete value of it. So a value that will show as 3,55 but on the fx tab will show as 3,5566 will import as 3,55.
The issue can be fixed if I set IMEX=0 but on that case I am loosing all the initial rows. With IMEX =0 the fields would (as I see) take there initial form so It will not show 37,44 € string but D (DECIMAL) 37,445423

Another thing is that this will show OK on some worksheets and bad on other. So the question is how would I take the full fx value without changing IMEX=1 to IMEX=0 , is there another extended property to insert?

So is there some extender property to ignore formatting?


Thanks.


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>