从excel导入到网格视图无法在某些计算机上运行 [英] Import from excel to grid view not working on some machines

查看:83
本文介绍了从excel导入到网格视图无法在某些计算机上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello All,



我使用以下代码将excel导入asp.net中的gridview。代码在我的笔记本电脑上工作正常但是在服务器或用户上的客户端站点上都没有。请建议..



Hello All,

I am using the following code to import excel to gridview in asp.net. The code is working fine on my laptop but the same is not working on client site either on server or on users. pls suggest..

Protected Sub btnUpload_Click(sender As Object, e As EventArgs) Handles btnUpload.Click
       Try
           If FileUpload2.HasFile Then
               Dim FileName As String = Path.GetFileName(FileUpload2.PostedFile.FileName)
               Dim Extension As String = Path.GetExtension(FileUpload2.PostedFile.FileName)
               Dim FolderPath As String = ConfigurationManager.AppSettings("Folderpath")

               Dim FilePath As String = Server.MapPath(FolderPath + FileName)

               FileUpload2.SaveAs(FilePath)

               Import_To_Grid(FilePath, Extension, rbHDR.SelectedItem.Text)
           End If
       Catch ex As Exception
           fnMessage(Me, ex.Message)
       End Try

   End Sub





谢谢



Thanks

推荐答案

安装64位办公室就可以了。
Installing 64 bit office did the trick..


这篇关于从excel导入到网格视图无法在某些计算机上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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