使用fileupoload选项导入excel文件 [英] Import the excel file using fileupoload option

查看:105
本文介绍了使用fileupoload选项导入excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的代码如下



My code as follows

protected void btnimport_Click(object sender, EventArgs e)
   {
   string path = System.IO.Path.GetFileName(fileupload15.PostedFile.FileName);
   fileupload15.PostedFile.SaveAs(Server.MapPath("~/Import_Excel/" + path));
   GvSch.DataSource = ImportExcelXLS(path, false, out message);
   GvSch.DataBind();
}



i在该文件夹中创建一个名为Import_Excel的新文件夹名称我要保存所选的excel文件。





在运行模式下,我点击选择文件并选择excel文件并单击导入按钮



当我运行时上面的代码显示错误如下



ilistsource不包含任何数据源



请帮助我。

我的上述代码有什么错误。



问候,

Narasiman P.


i create a new folder name called Import_Excel in that folder i want to save the selected excel file.


In run mode i click the choose file and select the excel file and click import button

When i run the above code shows error as follows

ilistsource does not contain any data sources

please help me.
what is the mistake from my above code.

Regards,
Narasiman P.

推荐答案

查看类似的讨论



IListSource不包含任何数据源。 [ ^ ]
Check this similar discussion

The IListSource does not contain any data sources.[^]


这篇关于使用fileupoload选项导入excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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