Troubleshooting Excel and BarTender Follow
This article walks you through the most common errors when using Microsoft Excel.
Common Error Messages
Here's a list of common error when using Excel. You can use this list to jump to particular topics or just work through the troubleshooter.
Record Set: database name encountered a Connection error.
External table is not in the expected format
Microsoft Excel Driver Not Found
Object reference not set to an instance of an object
Message #6670 Failed to connect to database
Message #6241: A connection to the database could not be made
Message #6239: The Select Records dialog cannot be shown
Make sure file exists
Since BarTender needs to connect to the document every time a document is printed, you should ensure that the Excel file that you're trying to use still exists in the directory.
We recommend using a UNC path (\\servername\foldername\filename) instead of mapped network drives (X:\foldername\filename). UNC paths are traversable for all users on a computer, but mapped drives are user specific. This may cause problems for other users that are attempting to use the BarTender document, but don't have the same drive mapped.
Check file permissions
Once you know that the file exists where it's supposed to be, you need to make sure that you can access the file.
If you're printing from directly in BarTender, just make sure that you can open the file in Excel. If you can, then you have the proper read permissions for the directory and you can move on the next step. If you can't open the file directly in Excel, you'll need to contact your network administrator to obtain the proper permissions.
If you're automating BarTender in some fashion or BarTender is running non-interactively, then you'll need to make sure that you're assigning a user to the non-interactive session that has proper permissions.
To see if a user has permission to the file:
- Browse to the Excel file in File Explorer or Windows Explorer.
- Right-click on the Excel file and select Properties to open the corresponding dialog.
- In the Properties dialog, select the Security tab.
- Add your user account and make sure it has Read permissions checked. You may need to contact your IT administrator to accomplish this.
- Close and reopen BarTender.
- Re-create the connection to the Excel file using the Database Connection Setup dialog.
Make sure the file is closed by all users
Microsoft Excel files are locked, by default, when any user on your network (inclucing you!) has it open. If you, or someone else, is editing the file in Excel, BarTender will not be able to connect to the file until it's saved and closed.
To see if someone else has the file open:
- Open the Excel file directly in Microsoft Excel
- If the file is checked out by another user, You will see the message "File in Use" by: user. User is the Windows user account that currently has the file open.
- Contact the user and verify that they close the Excel file
- Close and reopen BarTender
- Re-create the connection to the Excel file using the Database Connection Setup wizard
Install the latest Access Database Engine
Connecting to Microsoft Excel documents requires the Microsoft Access Database Engine. This is a tool provided by Microsoft that allows applications (like BarTender) to connect to Microsoft Excel and Access.
You can install the latest version of the Microsoft Access Database Engine like this:
- Download AccessDatabaseEngine.exe from Microsoft.
- Run AccessDatabaseEngine.exe.
- Click through the installation wizard.
- Close and reopen BarTender.
- Re-create the connection to the Excel file using the Database Connection Setup wizard.
Match architecture between Office and BarTender (32-bit/64-bit)
Software can have different architecture (32 bit or 64 bit). If you are receiving this error and Microsoft Office is already installed, it means the architecture of BarTender and Microsoft Office do not match. Reinstalling BarTender to match the architecture to Microsoft Office should resolve this issue.
Alternatively, you can choose to change the version of Office that you have installed, but that's typically much more work.
1. Check office architecture
First, you'll need to verify the architecture of your Office installation.
These instructions work for Office 2016 and Office 365, but the instructions may be different for older versions of Office.
- Open any Office program (e.g. Word or Excel)
- Go to File and then Account
- Click on About
- At the top of the window, you'll see a long version string. The last part shows you the architecture of Office ( e.g. Microsoft Word 2016 MSO (220.127.116.11.2270) 64-bit )
2. Download correct version of BarTender
Once you've verified the version of Office that you are using, you should download the version of BarTender that matches it.
You can download the correct version of BarTender here: Service Releases. Make sure that you choose the version that matches your version of Office.
3. Uninstall the current version of BarTender
You must install the current version of BarTender before you can install the correct one. You can do this while you're downloading the new version of BarTender.
- Open Windows Control Panel
- Choose Uninstall or change a program
- Select BarTender and choose uninstall
- Wait for the uninstall to complete
4. Install the new version of BarTender
Once you've removed the older version of BarTender, it's now safe to install the newer version. For help installing BarTender, see Installing BarTender.