> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/x/xlsx-file-domains.md).

# XLSX File Domains

XLSX File Domains reads an Excel workbook (`.xlsx`) that you copy to the connector host. Every sheet is read. The first row of each sheet is its header, and each following row becomes one domain record. OctoXLabs uses it to add domains that no other adapter can reach.

## Use cases

* Import domains from a spreadsheet or an export of a system that has no adapter. List everything this adapter imported:

```
Adapters = xlsx-file-domains
```

* Show only the records of one connection. Replace the name with the name you gave the connection.

```
Connections = YOUR_CONNECTION_NAME
```

## Before you begin

### Network

| Source              | Destination                             | Port           | Protocol       |
| ------------------- | --------------------------------------- | -------------- | -------------- |
| OctoXLabs connector | Local file system of the connector host | Not applicable | Not applicable |

This adapter makes no network calls.

### Required permissions

| Scope or role                                      | Permission | Needed for    |
| -------------------------------------------------- | ---------- | ------------- |
| File system, `/opt/octoxlabs/connector/media/xlsx` | Read       | The XLSX file |

The file path is resolved inside this folder. An absolute path or a `..` segment in **Filename** is rejected.

## Create credentials in XLSX File Domains

This adapter needs no credentials. Prepare and place the file instead.

{% stepper %}
{% step %}

### Prepare the file

Create a `.xlsx` file. Put the column names in the first row of every sheet. Column names may contain only letters, `-` and `_`. Use the column names from the fields table below so rows map on their own.
{% endstep %}

{% step %}

### Copy the file

Copy the file to `/opt/octoxlabs/connector/media/xlsx` on the connector host.
{% endstep %}

{% step %}

### Check the permissions

Make sure the connector process can read the file.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter         | Required | Type | Default    | Description                                                                                                                  |
| ----------------- | -------- | ---- | ---------- | ---------------------------------------------------------------------------------------------------------------------------- |
| Filename          | Yes      | Text |            | Name of the file in `/opt/octoxlabs/connector/media/xlsx`. A pattern such as `domains*.xlsx` reads the newest matching file. |
| Primary Key Field | No       | Text | PrimaryKey | Column that holds the unique ID of each record.                                                                              |
| List Separator    | No       | Text | `\|`       | Character that separates the values of a multi-value cell.                                                                   |

## Troubleshooting

| Error message                                                                 | Cause                                                                                 | Fix                                                                                     |
| ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| File not found with this pattern.                                             | No file matches **Filename** in the media folder, or the match is outside the folder. | Check the name and the pattern. Copy the file to `/opt/octoxlabs/connector/media/xlsx`. |
| An absolute path is not allowed; give a name relative to the adapter's folder | **Filename** is an absolute path.                                                     | Enter a name relative to the folder.                                                    |
| file is empty.                                                                | The workbook has no content.                                                          | Check the file.                                                                         |
| Header has bad char. Please check your headers                                | A header has characters other than letters, `-` and `_`.                              | Rename the header.                                                                      |

## Change history
