Click here to Skip to main content
12,398,537 members (60,152 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: ASP.NET MS-Excel
My excel is in following format. i am importing it in asp.net application by using
OleDbCommand cmd = new OleDbCommand("SELECT * FROM [" + sheet + "]", conn);
Date Loan Borrower Fees Interest
07-05-2012 4.536E+17 Srinibas1 50.00 350.00
07-05-2012 4536000002 Srinibas2 50.00 351.00
07-05-2012 4536000003 Srinibas3 50.00 352.00

then inserting it in dataset
output.Tables.Add(outputTable);
          new OleDbDataAdapter(cmd).Fill(outputTable);
MY PROBLEM IS i want to read all column as string and command read EXPONENTIAL format. how can i get rid of exponent while diplayin record in gridview.

any help is much appreceiable.
Thanks
Posted 1-Aug-12 3:04am
Updated 1-Aug-12 18:56pm
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

See if following discussion helps you:
excel-to-datagrid-exponential-issue[^]
  Permalink  
Comments
pradiprenushe 2-Aug-12 1:57am
   
My 5. Link provided by Chasfer also very useful in such scenario.
Vani Kulkarni 2-Aug-12 3:57am
   
Thanks Pradip
Gufran_khan 2-Aug-12 4:32am
   
thanks but none of them worked. the value i am importing is an ID so i want exact value and conversion in dotnet doesnot convert it in same value as it was in excel.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  
Comments
pradiprenushe 2-Aug-12 1:56am
   
Very good link. My 5
Gufran_khan 2-Aug-12 4:33am
   
thanks for your response but I am importing excel into asp.net application and article is about exporting data from app to excel.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 2 Aug 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100