XL: "Unexpected Error" Appears When You Use Template Wizard

ID: Q140458

The information in this article applies to:

SYMPTOMS

In Microsoft Excel, if you use the Template Wizard to create a database template that is linked to a database other than Microsoft Excel or Microsoft Access, the following message may appear:

   Unexpected Error

CAUSE

This problem occurs when you use the Template Wizard and you specify a dBASE or Microsoft FoxPro database file in the step 2 of the wizard, and you point to a folder that contains the database file.

NOTE: When you specify a Microsoft FoxPro or a dBASE file, you must select the folder that contains the file and not the file itself.

WORKAROUND

To work around this problem, use the following steps.

   1. Open the dBASE or Microsoft FoxPro database file in Microsoft Excel.

   2. Click Save on the File menu, select the Microsoft Excel Workbook
      (*.xls) format in the Save As Type box and click OK.

   3. In the first row, select and copy only those cells that contain
      database fields.

   4. Close the .xls file you saved in step 2.

   5. Click the New Workbook toolbar button to create a new workbook.

   6. Click Paste on the Edit menu to paste the field information in the
      first row.

   7. Click Template Wizard on the Data menu and click Next.

   8. In step 2 of the wizard, click the location box and click Browse.

   9. Locate the .xls file you saved previously and click Open.

  10. In step 3 of the wizard, select each cell to which the wizard will
      link in the database, type a name for each field, and click Finish.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.

MORE INFORMATION

The add-in discussed in this article is provided "as is" and Microsoft does not guarantee that it can be used in all situations. Although Microsoft Technical Support professionals can help with the installation and existing functionality of this add-in, they will not modify the add-in to provide new functionality.

The Template Wizard can automatically copy the contents of cells to a database each time you save a workbook that is based on a template. The Template Wizard walks you through the steps of linking cells in the template to a field in a database or in a Microsoft Excel list.

To use the Template Wizard, you must install it and select the Template Wizard With Data Tracking check box in the Add-Ins dialog box.

To link templates to dBASE or Microsoft FoxPro databases, you must also install appropriate Open Database Connectivity (ODBC) driver and Data Access Objects. In addition, you must select the ODBC Add-In option in the Add-Ins dialog box.

To enable add-in options in Microsoft Excel, click Add-Ins on the Tools menu and select the desired options.

REFERENCES

For more information about how to create a template using the Template Wizard, click the Index tab in Microsoft Excel Help, type the following text

   Template

double-click the selected text, and then double-click "Create a template to export worksheet data to a database" to go to the "Create A Template To Export Worksheet Data To A Database" topic.

Additional query words: 7.00 8.00 97

Keywords          : kbualink97 xladdins xlwin 
Version           : WINDOWS:7.0,97
Platform          : WINDOWS

Last Reviewed: May 17, 1999