excel在asp.net中导入 [英] excel import in asp.net

查看:113
本文介绍了excel在asp.net中导入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Excel格式如下.我正在使用
将其导入asp.net应用程序

My excel is in following format. i am importing it in asp.net application by using

OleDbCommand cmd = new OleDbCommand("SELECT * FROM [" + sheet + "]", conn);


日期贷款借款人费用利息
2012年7月5日 4.536E + 17 Srinibas1 50.00 350.00
2012年7月5日4536000002 Srinibas2 50.00 351.00
2012年7月5日4536000003 Srinibas3 50.00 352.00

然后将其插入数据集


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);


我的问题是我想以字符串形式读取所有列,并以指数格式读取命令.如何在gridview中显示记录时摆脱指数.

任何帮助都是非常明显的.
谢谢


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

推荐答案

看看下面的讨论是否对您有帮助:
excel-to-datagrid-exponential-issue [
See if following discussion helps you:
excel-to-datagrid-exponential-issue[^]


您可以检查本文: 9解决方案,将数据导出到Excel for ASP.NET [ ^ ]
You may check this article : 9 Solutions to Export Data to Excel for ASP.NET[^]


这篇关于excel在asp.net中导入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆