导入EXCEL数据的一个引用错误的问题,请大家帮助
我用C#写了一个导入EXCEL数据的程序,在我的本机可以,但是放在服务器上老是出现:
异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。
源错误:
行 479: if(this.fileup.Value!="")
行 480: {
行 481: DataTable dtExcel = baseinfo.ReadExcel(this.fileup.Value).Tables[0];
行 482: int count=dtExcel.Rows.Count;
行 483: if(count>0)
源文件: c:\inetpub\wwwroot\UniteTop_WebUI\OrderManage\orderCreate.aspx.cs 行: 481
堆栈跟踪:
[NullReferenceException: 未将对象引用设置到对象的实例。]
JunLin.UniteTop.WebUI.OrderManage.orderCreate.btnImport_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\UniteTop_WebUI\OrderManage\orderCreate.aspx.cs:481
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292
这样的错误,请问什么原因?
感谢