- Connect BI Tools >
- Connect from Microsoft Excel
Connect from Microsoft Excel¶
You can import data from a MongoDB collection into a Microsoft Excel spreadsheet with the MongoDB Connector for BI and an ODBC data connection.
Prerequisites¶
- Install the MongoDB C Authentication Plugin for your platform.
- Create a 64-bit system Data Source Name (DSN).
Authentication¶
New in version 2.2: The MongoDB Connector for BI now offers MySQL authentication plugins allowing you to connect with authentication or TLS/SSL.
There are two options for authenticating your connection:
Use an authentication plugin with either the
SCRAM-SHA-1
orPLAIN
authentication mechanism.Important
The use of TLS/SSL is recommended as:
- The
SCRAM-SHA-1
mechanism hashes the passwords in the client plugin. However, all other data is in cleartext. - The
PLAIN
mechanism sends the password in cleartext.
See C Authentication Plugin or Install the JDBC Authentication Plugin for more information on the plugins.
- The
Provide cleartext credentials for simple username/password authentication against a MongoDB database. This method uses MySQL’s built-in
mysql_clear_password
plugin.Note
Authentication with
mysql_clear_password
requires the use of TLS/SSL. See Connect from MySQL with Authentication and TLS/SSL for more information.
The MongoDB Connector for BI requires authentication when running with --auth
.
When the MongoDB Connector for BI receives a connection with authentication credentials
from a client, it passes those credentials through to the underlying
MongoDB instance.
You can specify the following authentication options after your username as URI-style query parameters:
Connection Option | Description |
---|---|
|
Specify the name of the database which stores the user’s credentials. If you do not specify this option, the MongoDB Connector for BI will default to the current database associated with the MySQL connection. For authentication mechanisms such as |
|
Specify the mechanism that the MongoDB Connector for BI should use to authenticate the connection. Accepted values include:
LDAP requires MongoDB Enterprise.
Set the source to Note Neither Kerberos nor x.509 are supported. |
Example
To authenticate as user grace
with the LDAP authentication
mechanism, use the following username:
grace?mechanism=PLAIN&source=$external
New in version 2.2.
Connect from Excel with the C Authentication Plugin¶
Before beginning this tutorial, make sure you have a running
mongosqld
instance.
Start Excel¶
Start Microsoft Excel and open a blank worksheet.
Select the Data Tab¶
Select the Data tab to open the Data toolbar.
Open a Data Connection Wizard Dialog¶
- Click the Get External Data button on the left side of the toolbar.
- Click From Other Sources.
- Select the From Data Connection Wizard option.
Select a Database and Table¶
Select a database from the dropdown list and a collection from which to import data. Click Next when finished.
Save the Connection File¶
Save the data connection file and click Finish. If you wish to re-use this connection in the future, you can select it from the Data -> Get External Data -> Existing Connections menu.
Specify Worksheet Format¶
In the final dialog window you can specify a format for your worksheet. Click OK when finished.