简体   繁体   English

无法将导出的Excel文件上载到SQL Server 2008

[英]Unable to upload the exported excel file to sql server 2008

I am using the telerik rad controls in my asp.net web application. 我在asp.net Web应用程序中使用telerik rad控件。 User can export any excel file say Test.xls. 用户可以导出任何Excel文件,例如Test.xls。 But when I try to import(Upload) Test.xls to Sql Server 2008. It gives error External Table is not in correct format. 但是,当我尝试将Test.xls导入(上传)到Sql Server 2008时,它给出了错误。外部表格式不正确。 And the application crashes at the time of opening the Oledb connection. 并且在打开Oledb连接时应用程序崩溃。 But if I create another Excel file say New.xls and import that file to my database, it works fine. 但是,如果我创建另一个Excel文件,请说New.xls并将该文件导入到我的数据库中,则可以正常工作。

Can anyone help? 有人可以帮忙吗?

Thanks In Advance 提前致谢

Not really much that we can say with so little information. 很少的信息我们可以说的并不多。 Best guess would be that your excel column data mappings don't match those required by the database. 最好的猜测是您的excel列数据映射与数据库所需的不匹配。

New.xls may be a red herring if it doesn't contain any data. 如果New.xls不包含任何数据,则可能是一个红色鲱鱼。

Try and give us a little more information please regarding data and the exception - have you looked at the actual exception data by running this in debug in VS? 请尝试为我们提供更多有关数据和异常的信息-您是否通过在VS中的调试中运行此数据来查看实际的异常数据? If so what is it? 如果是这样,那是什么?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM