读取excel文件数据报错

 

问:dddddd123主机 读取excel文件数据报错

Server Error in \’/\’ Application.外部数据库驱动程序 (1) 中的意外错误。Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
Exception Details: System.Data.OleDb.OleDbException: 外部数据库驱动程序 (1) 中的意外错误。
Source Error: 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace: 
[OleDbException (0x: 外部数据库驱动程序 (1) 中的意外错误。] System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) 320 System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) 88 System.Data.ProviderBase.DbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) 24 System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions) 38 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) 507 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) 154 System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) 21 System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) 19 System.Data.OleDb.OleDbConnection.Open() 42 jwtd.hed.ExcelToDS(String Path) 77 jwtd.man_htm.ks_test_cjdr.FileUp_looksj_btn_Click(Object sender, EventArgs e) 118 System.Web.UI.WebControls.Button.OnClick(EventArgs e) System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) 204 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) 12 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) 15 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) 35 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 1738
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2116.0,读取excel文件数据报错

答:您好,非常抱歉,虚机目前暂未支持 excel的读取操作,若需相关功能,建议可升级至云服务器自行配置环境以满足需求  ,非常感谢您长期对我司的支持.由此给您带来的不便之处,敬请原谅!谢谢!

问:从没听说过还有这样的主机的,那请把我的主机换成b064型的,谢谢!因为这种型号的主机是支持读取excel文件数据的,我个人认为一个主机不能读取excel文件数据,是不能用的。

问:价格是相同的

答:您好:

请问您具体需要操作读取excel的文件是那个 ,我司可为您检查一下连接字符串 ,2008以及以上的系统都更新了微软的最新安全补丁,其中可能导致一些比较老的连接方法因为不安全被屏蔽,非常感谢您长期对我司的支持!

问:dddddd123/www/man_htm/sjwenj/lxez/heyma.xls

问:现在还是不能连接

答:您好,我公司所有虚拟主机均未安装OFFICE组件;ASP.NET程序只需要将 excel的相关调用DLL文件放在bin目录即可使用;具体可咨询一下你本地的程序开发人员,非常感谢您长期对我司的支持.由此给您带来的不便之处,敬请原谅!谢谢!

问:没有用OFFICE组件啦,是用System.Data.OleDb连接的,看来你这方面的知识是不够了解的

答:您好,原因是:

2008/2012系统安装10月微软发布的补丁后JET引擎连接excel文件有异常,目前解决办法是修改程序连接字符串Provider=Microsoft.Jet.OLEDB.4.0;Extended Properties=Excel 8.0;Data Source=需要修改连接串为Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=或Provider=Microsoft.ACE.OLEDB.12.0;Extended Properties=\’Excel 12.0;HDR=YES;IMEX=1\’;Data Source=,非常感谢您长期对我司的支持!

问:现在我已经把主机升级成为b064型了,仍然不能够连接excel文件数据,现在我是同一套程序,运行的两个b064型的主机,一个主机是可以正常运行的,现在这个主机不可以正常运行。至于您提到的这个调换连接字符串的问题的话,这个我们暂时不考虑,因为这个修改工作量是很大的,这个类似的情况呢,前段时间曾经出现过,你们是处理好的,你可以去检查我前面提交的工单

答:您好,您可能没有看上一条回复工单,请仔细阅读,并修改您的连接字符串,目前只有2003系统未更新补丁,可以用旧的驱动连接代码连接,但2003系统因微软停止更新,存在极大的安全隐患,我司即将计划将所有2003系统全部升级为2008,请尽量升级您的代码,非常感谢您长期对我司的支持.由此给您带来的不便之处,敬请原谅!谢谢!

更多关于云服务器,域名注册,虚拟主机的问题,请访问西部数码官网:www.west.cn
赞(0)
声明:本网站发布的内容(图片、视频和文字)以原创、转载和分享网络内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-62778877-8306;邮箱:fanjiao@west.cn。本站原创内容未经允许不得转载,或转载时需注明出处:西部数码知识库 » 读取excel文件数据报错

登录

找回密码

注册