# Excel (macOS)

### Getting the connection URL

Once you've created your query, head over to the [queries module](https://app.tukanmx.com/visualizations/queries), and click on the export button for the query you wish to connect.

<figure><img src="https://1499304022-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKkVlcNPFyJ2f7v0nyyEo%2Fuploads%2F8kYEZIDxxU7fYdNLtGg5%2Fimage.png?alt=media&#x26;token=029530f9-22af-46b6-a0cb-9aec0bce0e84" alt=""><figcaption></figcaption></figure>

Next, select the Excel (macOS) tab and click the ***Copy link*** button to copy the query's "connection string" to your clipboard.

This "connection string" is what will allow Excel to connect directly to our database and ensure you always have the latest data available in your spreadsheet.

***

### Connecting Excel

{% hint style="success" %}
Please note that this is only done the **first time** you connect a query. Once you've established the connection, you only need to refresh the feed to get the latest data...
{% endhint %}

Open an Excel spreadhseet, and perform the following instructions:

1. Select the ***Data*** tab.
2. Next, click on the ***Get Data (Power Query)*** button.
3. On the list of options, select: ***Blank query***. There, **replace** **the default text** with what you stored on your clipboard (i.e. your query's connection string).
4. Click on the Next button on the lower right side of the panel.

<figure><img src="https://1499304022-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKkVlcNPFyJ2f7v0nyyEo%2Fuploads%2Fk3rcG2e8CqLd9JW4gcqw%2Fexcel_mac_1.gif?alt=media&#x26;token=afeb6552-89c2-43eb-811c-1e31c860c4ff" alt=""><figcaption><p>Connecting tukan to Excel (macOS)</p></figcaption></figure>

Once you've done that, it's time to approve the connection and transform the data.

1. Select the ***"Configure connection"*** button on the yellow banner.
2. Next, a pop-up will appear to request credentials. The default option should be *"Anonymous"*, which means you can simply select the ***"Connect"*** button and continue.
3. Wait a few seconds for the connection to establish. Once it's done, you should see a preview of the data on the Power Query module.
4. To ensure Excel reads the data correctly, i.e. numbers as numbers, dates as dates, strings as strings; select any cell in the preview module followed by `⌘+A`. Next, on the transform tab select the ***Detect data type*** button.
5. Finally, once the transformation is done. Select the ***Close & load*** button, to import your query to your spreadsheet.

<figure><img src="https://1499304022-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKkVlcNPFyJ2f7v0nyyEo%2Fuploads%2FSEHqGdEncdYUdS2WY0dy%2Fexcel_mac_2.gif?alt=media&#x26;token=3307b400-fbcc-4f56-9fca-4b816fd24611" alt=""><figcaption></figcaption></figure>

That's it. Your query should appear within a few seconds on your spreadsheet :partying\_face:.

***

### What's next?

Playing around with the data.

The process we followed imports your data as a [Table](https://www.ablebits.com/office-addins-blog/excel-table-tutorial/) in Excel. In case you modify your query, or wish to extract the latest data; simply hit *refresh* on the Table module.

<figure><img src="https://1499304022-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKkVlcNPFyJ2f7v0nyyEo%2Fuploads%2FzQJPFAKcBPrSnnJn4n1r%2Fimage.png?alt=media&#x26;token=19ba7b46-e14a-4ded-b36e-9c52b27b8e72" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tukanmx.com/queries/connecting-to-a-query/excel-macos.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
