MATLAB: Does QUERYBUILDER ask for a username and password when using an Excel File data source with no worksheet specified in Database Toolbox 3.3 (R2007a)

databaseDatabase Toolboxexcelpassword

I select the "Excel File" ODBC data source in QUERYBUILDER. The Visual Query Builder then prompts me for username and password, which should not be needed for Excel Files.

Best Answer

This is the expected behavior when no workbook is specified.
To work around this issue, specify a Workbook before using the Excel File data source. To do this:
1. From the Visual Query Builder, select File (Query for newer versions of MATLAB)->Define ODBC Data Sources.
2. Select Excel Files, and click Configure.
3. Click Select Workbook and pick your XLS-file.
4. Click OK, then OK.
You should now be able to use the Excel Files datasource.
In general, when a database connection fails, the Query Builder then attempts to reconnect with a username and password, as this is the cause of most failures with most databases. Attempting to connect to an unspecified Excel file triggers this behavior.