如何上传excel文件并将其数据提取到gridview [英] how to upload a excel file and fetch it's data to gridview

查看:172
本文介绍了如何上传excel文件并将其数据提取到gridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi EveryOne,



我想将一个excel文件上传到一个文件夹并将其值提取到formview。

这个我我可以使用Windows服务但是可以在不使用Windows服务的情况下在aspx页面中完成。

Hi EveryOne,

I want to upload a excel file to a folder and fetch it's value to the formview.
This i am able to do using windows service but can it be done in aspx page without using windows service.

推荐答案

您应该将工作表导入DataSet对象,然后绑定它是一个GridView。



看看这些链接:



Excel Sheet to DataSet:< a href =http://stackoverflow.com/questions/18006318/how-to-import-all-the-excel-sheets-to-dataset-in-c-sharp> link_1 ^ ]



将DataSet绑定到Gridview: link_2 [ ^ ]



谢谢,

-RG
You should import your sheets into a DataSet object, and then bind it to a GridView.

Take a look at those links:

Excel Sheet to DataSet: link_1^]

Bind DataSet to Gridview: link_2[^]

Thanks,
-RG


这篇关于如何上传excel文件并将其数据提取到gridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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