XLCubed is now FluenceXL. The new wiki can be found here: https://help.fluencexl.com/ |
Query Tables/Version 6.5
Query Tables allow you to bring relational data into the Excel environment, while keeping a dynamic link to the data source. This means that when your data changes, your spreadsheets can be easily kept up to date.
Contents
[hide]Insert a Query Table
To insert a Query Table:
- Select the XLCubed > Insert Formula > Query Table... from the XLCubed ribbon.
- Select the type of connection you want to create - for this example we are using Microsoft SQL Server.
- Include the server name and select the authentication type with which to connect.
- Click Connect and you should then see all the databases on the server to which you have access. Select the database before continuing.
- Select the destination cell for your statement and then build up your query by dragging tables across to the main tab in the window.
- As you pick the fields you will see the SQL statement build up in the lower half of the screen. Click OK when finished.
- The Query Table formulae will be inserted in the row that you selected, and the Query Table itself in the row below.
- Right-clicking on the XL3QueryTableSetSQL cell will bring up option to Edit Query table so that you can make changes.
Editing Existing Query Tables
Editing the XL3QueryTableSetConnectionString and XL3QueryTableSetSQL formulae allow you to edit the connection string and the SQL, respectively.
Query Table Control Formulae
XLCubed Excel Edition allows you to use formulae to help you manage your Query Tables:
- XL3QueryTableGetConnectionString
- Allows you to retrieve the connection details for a Query Table
- XL3QueryTableSetConnectionString
- Allows you to control the connection details for a Query Table. You can use regular Excel formulae to make the connection string, setting details such as the server or database name, then use this formula to easily change the Query Table
- XL3QueryTableSetSQL
- Like the XL3QueryTableSetConnectionString formula, XL3QueryTableSetSQL allows you to use Excel formulae to build up the SQL string to bring in user-selected criteria such as the period or the product the query should be run for. The XL3QueryTableSetSQL formula then references this statement, and each time the statement changes, the Query Table is referenced with the new criteria
- XL3QueryTableSetParam
- Allows you to set parameters on a Query Table