> For the complete documentation index, see [llms.txt](https://docs.xlconnect.net/xlconnect-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xlconnect.net/xlconnect-documentation/developing-with-xlconnect/import-scripts.md).

# Import Scripts

The easiest way to get started with XLConnect development is with Prefab Scripts, that you can import from the Ribbon. For this example we will use Xero, for other platforms it works similarly.&#x20;

On the Ribbon, select `Import Script > Xero > Connections`.&#x20;

<figure><img src="/files/pt2NkzvLffWYf1pP1vGp" alt=""><figcaption><p>Insert a Xero Connections Script</p></figcaption></figure>

On the right hand side of your screen the Maps and Scripts pane will open with a script called 'Connections', with under it two maps Input and Output, and under output a table again called Connections.&#x20;

![](/files/mpB2fDrQTb0kLLzI3sQ8)

The Connections table is grey, indicating it is not connected to workbook cells. To connect it, click and hold the table, to drag it onto your workbook. This should create a table with two generic columns called Column1 and Column2, and a message telling you it will get it's columns from the data:&#x20;

![](/files/485Bb8qnpZ7030FleDi2)

So let's execute the script. To do that, right click the script, then choose `Execute Script`:

![](/files/wceJ5Ji0Oa7mMr3w3An5)

This will execute the script, this will call into the Xero API to pull the connection so it will probably open up a browser to log in to Xero.&#x20;

![](/files/nMOJfDKhnXTU7WjJIjgm)![](/files/LhwA7KaQ1A259oMoSOu4)

Complete the steps, then it will pull the data and display it in the table:&#x20;

<figure><img src="/files/jvLMf29sy0y8JbByJG4p" alt=""><figcaption><p>Table with list of Companies from Xero</p></figcaption></figure>

The companies in this example have been altered, you should recognize the companies on Xero that you have access to. To get access to more companies, go though the login process again.&#x20;

Now it's time to select the company we want to pull the data for, to do that mark the column `Pull` with an x.&#x20;

![](/files/5Hr312J0ZwGMYGQHKWXJ)

Now we have a list of Zero Companies, but no data yet. Let's pull the chart of accounts for a company. To do this, import the Accounts script:&#x20;

![](/files/j76wZR6Klz8bO4SXrDC1)![](/files/kLcK0jr9LxsCR9FOcOK2)

This imported a second script 'Accounts', with one input table `Connections` and an Output table `Accounts`. The Connections table is white, inidcating it is connected. That's because it the Excel table created in the step above is also called Connections. XLConnect will automatically connect a table connection when it finds a table with the same name.&#x20;

To connect the Accounts table to the workbook, drag it onto the worksheet. You will get the same message a earlier that it needs to pull data to derive the columns. Your workbook should look like this:&#x20;

<figure><img src="/files/lE1NnSUu8Q1YgQAtkUaj" alt=""><figcaption><p>Empty Accounts table below Connections table</p></figcaption></figure>

To expand the table, we'll do the same as with the first table, execute the `Accounts` script:&#x20;

![](/files/LBZp2XdGdPAek994u5wP)

Now XLConnect should grab your Chart of Accounts data from Xero and display it the table:&#x20;

<figure><img src="/files/UkKLUbOew6NjAqJFaTnz" alt=""><figcaption><p>Chart of Accounts for Company 3</p></figcaption></figure>

That is how easy it is to grab data from Xero by Drag & Drop, without even writing a single line of code.&#x20;


---

# 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:

```
GET https://docs.xlconnect.net/xlconnect-documentation/developing-with-xlconnect/import-scripts.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.
