WD: Errors When You Use ODBC to Insert Microsoft Excel Worksheet

Last reviewed: February 5, 1998
Article ID: Q160734
The information in this article applies to:
  • Microsoft Word for Windows 95, versions 7.0, 7.0a
  • Microsoft Word 97 for Windows

SYMPTOMS

When you attempt to insert a Microsoft Excel worksheet into a Word document or when you attempt to attach a Microsoft Excel worksheet as a data document to a mail merge main document using the Microsoft Excel ODBC driver, you receive one of the following error messages:

  • Word was unable to open the data source.

    -or-

  • Open Database Connectivity Error: Syntax error in query. Incomplete query clause.

    When you click the Details button, you receive the following message:

    ODBC Error: [Microsoft][ODBC Excel Driver] Syntax error in query.

                   Incomplete query clause.
                   SQL State: S1000
                   Return Code: SQL_Error
    
    

CAUSE

You did not select a worksheet from the Select Table dialog box. (To locate this dialog box, click to select the Select Method check box in the Open Data Source dialog box, select the Excel Files via ODBC (*.xls) driver in the Confirm Data Source dialog box, and then click OK.)

WORKAROUND

Use the following procedure to insert a Microsoft Excel worksheet as a database in Word:

NOTE: Be sure that the Microsoft Excel ODBC driver is installed before you follow this next procedure. If the Microsoft Excel ODBC driver is not installed, re-run Setup and install the ODBC driver.

  1. On the View menu, point to Toolbars, and then click Database.

    The Database toolbar appears.

  2. Click the Insert Database button on the Database toolbar.

  3. Click the Get Data button.

  4. Select the Microsoft Excel workbook you want to open, click to select the Select Method check box, and then click Open.

  5. In the Confirm Data Source dialog box, under Open Data Source, select "Excel Files via ODBC (*.xls)," and then click OK.

  6. In the Select Table dialog box, click Options.

  7. In the Table Options dialog box, click to select the System Tables check box, and then click OK.

  8. In the Select Table dialog box, under Table, select the worksheet you want to insert, and then click OK.

    NOTE: Each sheet name is appended with a dollar sign ($) symbol, such as Sheet1$, Sheet2$, and so forth.

MORE INFORMATION

For additional information, please see the following articles in the Microsoft Knowledge Base:

   ARTICLE-ID: Q156835
   TITLE     : OFF97: Complete Setup Doesn't Install All ODBC Drivers

   ARTICLE-ID: Q155179
   TITLE     : How to Mail Merge with an Excel Data Source in Word

STATUS

Microsoft has confirmed this to be a problem in the products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


KBCategory:
KBSubcategory: kbmerge
Additional query words: 7.0 7.0a word7 word95 8.0 word8 word97 xl
xcel xl97 excel97
Keywords : kbmerge kbinterop kbualink97
Version : 7.0 7.0a 97
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 5, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.