外部表格不是预期的格式。 (我的程序通过使用导出excel文件) [英] External table is not in the expected format. (My program exported a excel file by using)

查看:117
本文介绍了外部表格不是预期的格式。 (我的程序通过使用导出excel文件)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我的程序使用

 Context.Response.AddHeader导出excel文件(  content-disposition,附件)
Context.Response.ContentType = application / vnd.ms-excel



my excel文件以网页格式保存,下载后使用Microsoft Excel驱动程序将其导入我的系统后,我收到错误:

外部表格不符合预期的格式。



有谁知道如何解决?

期待你的帮助非常紧急



kalai







我的导出Excel编码

Dim form As New HtmlForm()

Dim attachment As String =attachment; filename = Patients.xls

Context.Response.ClearContent()

Context.Response.AddHeader(content-disposition,附件)

Context.Response.ContentType =application / ms-excel

Dim stw As New StringWriter()

Dim htextw As New HtmlTextWriter(stw)

form.Controls.Add(GridView1)

Me.Controls.Add(表格)

form.RenderControl(htextw)

上下文.Response.Write(sb.ToString())



MyConnection = New system.Data.OleDb.OleDbConnection(provider = Microsoft.Jet.OLEDB.4.0; & _

数据源= C:\Users\develope \Downloads \Patients.xls;&扩展属性= Excel 8.0;)



这是我的连接字符串,但我得到同样的错误

外部表格不是预期的格式。

解决方案

类似的问题d经理:

外部表不是以预期的格式。 [ ^ ]

Excel外部表格不是预期的格式。 [ ^ ]



外部表是不符合预期的格式。通常在尝试使用带有以下连接字符串的Excel 2007文件时出现:Microsoft.Jet.OLEDB.4.0和扩展属性= Excel 8.0


<如果需要,请查看此处 [< a href =https://www.google.co.in/search?q=External+table+is+not+in+the+expected+format.&ie=utf-8&oe=utf-8& aq = t& rls = org.mozilla:en-US:官方& client = firefox-a& channel = rcstarget =_ blanktitle =新窗口> ^ ]了解更多信息。

Hi,

My program exported a excel file by using

Context.Response.AddHeader("content-disposition", attachment)
Context.Response.ContentType ="application/vnd.ms-excel"


my excel file saved in webpage format, after downloading the same when i import it back to my system using Microsoft Excel driver, i got an error:
External table is not in the expected format.

Do anyone know how to solve it?
Expecting for your help very urgent

kalai



My Export Excel coding
" Dim form As New HtmlForm()
Dim attachment As String = "attachment; filename=Patients.xls"
Context.Response.ClearContent()
Context.Response.AddHeader("content-disposition", attachment)
Context.Response.ContentType = "application/ms-excel"
Dim stw As New StringWriter()
Dim htextw As New HtmlTextWriter(stw)
form.Controls.Add(GridView1)
Me.Controls.Add(form)
form.RenderControl(htextw)
Context.Response.Write(sb.ToString())"

MyConnection = New system.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0; " & _
"data source=C:\Users\develope\Downloads\Patients.xls; " & "Extended Properties=Excel 8.0;")

This is my connection string but i get same error
"External table is not in the expected format.

解决方案

Similar issue discussions:
External table is not in the expected format.[^]
Excel "External table is not in the expected format."[^]

"External table is not in the expected format." typically occurs when trying to use an Excel 2007 file with a connection string that uses: Microsoft.Jet.OLEDB.4.0 and Extended Properties=Excel 8.0



If needed, look here[^] for more.


这篇关于外部表格不是预期的格式。 (我的程序通过使用导出excel文件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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