+ Reply to Thread
Results 1 to 4 of 4

Expected table is not in the expected format - ADODB Connection to Read Only Excel file

  1. #1
    Registered User
    Join Date
    10-22-2007
    Location
    Mumbai, India
    MS-Off Ver
    MS Excel 2007
    Posts
    59

    Expected table is not in the expected format - ADODB Connection to Read Only Excel file

    Hi,

    A very strange issue noticed but dont know why no one on the net ever noticed it. I can see many of the users facing the same issue but concluded a very different reason for it and end of the day accepted that there is no solution to it.

    Here is the issue I'm facing for all those VBA experts who might have faced this issue and have the solution to it.

    I have a very small data in Excel and I'm connecting the same excel file using ADODB connection (I know there are various means of connecting excel and fetching records from the excel however for some reason i would like to stick to ADODB and would like to know if there is a solution to the issue raised).

    So, when i connect the excel file using ADODB connection, i'm able to connect it with no issues.
    Now, when i make the file as read-only by clicking on properties of the excel file, selecting it as read-only and hitting ok, i face an error stating "External table is not in the expected format".

    I have a necessity to keep the file as read only and dont want to us "save as" option even on a temp basis as a workaround.

    I repeat, the same code runs perfectly fine when the file is in read-write mode, only when i make the excel file as read only the issue begins.

    This happens with ace.oledb.12.0 as well as jet.oledb.4.0

    Any suggestions pls.

    Rgds
    Roshan

  2. #2
    Forum Contributor
    Join Date
    07-16-2012
    Location
    Ontario Canada
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: Expected table is not in the expected format - ADODB Connection to Read Only Excel fil

    Hmm, its kind of hard to say without looking at your code.
    Is there any way you could post a sample of the workbook/code?

  3. #3
    Registered User
    Join Date
    10-22-2007
    Location
    Mumbai, India
    MS-Off Ver
    MS Excel 2007
    Posts
    59

    Re: Expected table is not in the expected format - ADODB Connection to Read Only Excel fil

    Without being too much confident, I would still say the issue is not in the code however something else. If you can connect Excel as a database using ADODB, you can simple create the simplest table in Sheet1, try connecting it using ADODB connection. You will be able to do the same. Now, just make it read-only using the properties windows of the file and then try connecting it. You will get the error I'm facing.

    This error is all over the internet with no solutions.

  4. #4
    Registered User
    Join Date
    10-22-2007
    Location
    Mumbai, India
    MS-Off Ver
    MS Excel 2007
    Posts
    59

    Re: Expected table is not in the expected format - ADODB Connection to Read Only Excel fil

    Without being too much confident, I would still say the issue is not in the code however something else. If you can connect Excel as a database using ADODB, you can simple create the simplest table in Sheet1, try connecting it using ADODB connection. You will be able to do the same. Now, just make it read-only using the properties windows of the file and then try connecting it. You will get the error I'm facing.

    This error is all over the internet with no solutions.

  5. #5
    Registered User
    Join Date
    03-02-2018
    Location
    Chennai, India
    MS-Off Ver
    2010
    Posts
    1

    Re: Expected table is not in the expected format - ADODB Connection to Read Only Excel fil

    Hi,
    I'm getting the exact same error. You got any solution for this?

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: Expected table is not in the expected format - ADODB Connection to Read Only Excel fil

    Hello JohnRegies and Welcome to Excel Forum.
    This thread has been dormant for almost five years and the participants, who would be the only ones to get notification of a new post, have not used this board in at least two years. It would be better to start a new thread and post a link to this one since apparently the information is relevant.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] FORMAT not working for Date to text as expected
    By JimSnyder in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-31-2013, 05:30 PM
  2. Replies: 3
    Last Post: 01-04-2012, 09:27 AM
  3. [SOLVED] External table is not in the expected format
    By replyaslam in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-31-2006, 08:10 AM
  4. Replies: 0
    Last Post: 05-16-2006, 03:20 PM
  5. File size larger than expected
    By cat in forum Excel General
    Replies: 1
    Last Post: 06-09-2005, 04:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1