外部表格不是预期的格式。 RSS [英] External table is not in the expected format. RSS

查看:78
本文介绍了外部表格不是预期的格式。 RSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试打开* .xlsx文件时,它工作正常,但如果我尝试打开* .xls页面,它会抛出一个错误外部表格不是预期的格式。我在网上搜索但是无法用它来解决。请有人帮我解决它真的很紧急。



我使用下面的代码。女巫不工作。



when i try to open *.xlsx file it works fine but if I try to open *.xls page than it throws me an error External table is not in the expected format. I searched in net but couldnot sort out with it. Please someone help me to sort it out its really urgent.

i use below code. witch is not working.

Dim path As String
          fileuploadExcel.SaveAs(Server.MapPath("itemcsvfile\file1.csv"))
          path = Server.MapPath("itemcsvfile\file1.csv")
          Dim oconn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source= " & path & ";Extended Properties=Excel 12.0;")
          Dim ocmd As New OleDbCommand("select * from [Sheet1$]", oconn)
          oconn.Open()

推荐答案

,oconn)
oconn.Open()
", oconn) oconn.Open()


这篇关于外部表格不是预期的格式。 RSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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