读取Excel文件表时出错。 [英] Error while Reading Excel File Sheet.

查看:93
本文介绍了读取Excel文件表时出错。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在服务器路径中保存Excel工作表并读取数据时会出现以下错误

可能是解决方案吗?



格式初始化字符串的值不符合从索引33开始的规范。

描述:在执行当前Web请求期间发生了未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。



异常详细信息:System.ArgumentException:初始化字符串的格式不符合从索引33开始的规范。



来源错误:



第486行:

OleDbConnection oledbcon = new OleDbConnection(Provider = Microsoft.ACE.OLEDB.4.0 ; Data Source ='+ filepath +';+扩展属性='Excel 8.0;);

getting the following error while saving the excel sheet in server path and reading the data what
may be the solution?

Format of the initialization string does not conform to specification starting at index 33.
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.ArgumentException: Format of the initialization string does not conform to specification starting at index 33.

Source Error:

Line 486:
OleDbConnection oledbcon = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.4.0;Data Source='" + filepath + "';" + "Extended Properties= 'Excel 8.0;");

推荐答案

这对你有帮助...









在asp.net中将Excel文件数据显示到Gridview中 [ ^ ]





如果你满意你必须点击接受解决方案链接
this is helpful for u...




Display Excel file data into Gridview in asp.net[^]


if u satisfied u have to click on accept solution link


这篇关于读取Excel文件表时出错。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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