Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Getting error:External table is not in the expected format.while u

hi,

i am using microsoft jet engine to process an excel file and then uploading
it to the server

but i am getting the following error whent the application tries to open the
connection:

"

"External table is not in the expected format"



the code for this is mentioned below:



Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +
postedfile + ";Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"""

Dim conn As OleDbConnection

conn = New OleDbConnection(strConn)

conn.Open() '--------------------------here i am getting exception

dtSchema = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, Nothing)

If dtSchema.Rows.Count 0 Then

strSQl = String.Format("SELECT * FROM [{0}$]",
dtSchema.Rows(0)("TABLE_NAME").ToString.Replace("' ", "").Replace("$", ""))

End If



Please help
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
External table is not in the expected format. Amy E. Baggott Excel Discussion (Misc queries) 0 May 8th 09 04:26 PM
External table is not in the expected format. OWC11 Ujval Shah Excel Programming 0 November 22nd 06 12:13 PM
External table is not in the expected format. OWC11 Ujval Shah Excel Programming 0 November 22nd 06 12:11 PM
External table is not in the expected format replyaslam Excel Programming 4 May 31st 06 12:59 PM
ADO - Excel - External table is not in the expected format Adriana Camargo Excel Programming 3 May 21st 04 01:52 PM


All times are GMT +1. The time now is 09:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"