> For the complete documentation index, see [llms.txt](https://docs.koinju.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.koinju.io/connect-your-tools/excel.md).

# Excel

Pull Koinju market data straight into Microsoft Excel using either the ClickHouse ODBC driver or Excel's built-in Power Query connector.

## Before you start

| Setting       | Value                     |
| ------------- | ------------------------- |
| Host          | the provided database URL |
| Port          | 8443                      |
| Protocol      | HTTPS / SSL enabled       |
| Database      | api                       |
| User/Password | provided by Koinju        |

Don't have credentials yet? See [How to connect](/how-to-connect.md).

## Step-by-step

### Option A — ODBC driver

1. Download the Windows ODBC driver MSI from the [ClickHouse ODBC releases page](https://github.com/ClickHouse/clickhouse-odbc/releases) and install it.
2. Open **ODBC Data Sources** (Windows) and create a new **DSN** for the ClickHouse driver:
   * **Host**: the provided database URL
   * **Port**: `8443`
   * **SSL**: on
   * **Database**: `api`
3. In Excel: **Data ▸ Get Data ▸ From Other Sources ▸ From ODBC**.
4. Pick the DSN you created, enter the **username** and **password** provided by Koinju.
5. Choose a table (or supply a SQL statement) and **Load**.

### Option B — Power Query connector

1. Make sure the ClickHouse ODBC driver from Option A is installed (the Power Query ClickHouse connector relies on it).
2. In Excel: **Data ▸ Get Data ▸ From Database ▸ ClickHouse**.
3. Enter:
   * **Server / Host**: the provided database URL, port `8443`
   * **SSL**: enabled
   * **Database**: `api`
4. Supply the **username** and **password** provided by Koinju and load the data.

{% hint style="info" %}
The ClickHouse ODBC driver connects over the **HTTP(S) interface on port 8443** — the same endpoint used by every other tool in this section.
{% endhint %}

If timezone-aware datetimes look shifted or misbehave once loaded into a worksheet, see the timezone guidance in [How to connect](/how-to-connect.md).

## First sanity query

When prompted for a SQL statement (Option A's "advanced" entry or a Power Query native query), run:

```sql
SELECT exchange, market, timestamp, price
FROM api.trade
WHERE market LIKE 'BTC%' AND timestamp > toStartOfDay(now())
ORDER BY timestamp DESC LIMIT 20
```

If you get \~20 rows back, you're connected. Next, explore what data is available in [Data](/data/coverage.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.koinju.io/connect-your-tools/excel.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
