XLConnect
  • XLConnect Documentation
  • Using XLConnect
    • Getting Started
    • Using XLConnect
    • Manage Users
    • Manage Your Subscription (Owners)
    • XLConnect Security
    • Troubleshooting
  • Developing with XLConnect
    • Getting Started
    • The Bigger Picture
    • Import Scripts
    • Scripts
    • Cloud Systems
    • Javascript
      • Javascript Studio
      • Javascript language
      • Calling API's with HTTP Requests
      • Working with JSON data
      • The xlc object
      • Advanced Javascript
    • Modules
      • HTTP module
      • FILE module
    • Maps
    • JSON Data Format
    • Data Lake
    • Excel modelling
    • VBA
    • The XLConnect API
  • Reference
    • Change log
Powered by GitBook
On this page
  1. Developing with XLConnect

Import Scripts

Jumpstart your development by importing prefab scripts

PreviousThe Bigger PictureNextScripts

Last updated 1 year ago

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.

On the Ribbon, select Import Script > Xero > Connections.

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.

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:

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

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.

Complete the steps, then it will pull the data and display it in the table:

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.

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.

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:

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.

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:

To expand the table, we'll do the same as with the first table, execute the Accounts script:

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

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

Insert a Xero Connections Script
Table with list of Companies from Xero
Empty Accounts table below Connections table
Chart of Accounts for Company 3