Click here to Skip to main content
15,881,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My excel is in following format. i am importing it in asp.net application by using
C#
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
C#
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
Updated 1-Aug-12 18:56pm
v2
Comments
Pusting 12-Sep-17 2:46am    
First you can check out an asp.net example for excel processing, among other it shows how you can export an excel file to your client and in your case you could export it as HTML table element.
Second you can also check out a c# example for reading excel file, this ones demonstrates how you can read workbook, worksheets, rows, columns and cells (anything that you need).

See if following discussion helps you:
excel-to-datagrid-exponential-issue[^]
 
Share this answer
 
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.
You may check this article : 9 Solutions to Export Data to Excel for ASP.NET[^]
 
Share this answer
 
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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900