Returns the result of a SQL query as an array. This is a CSE/Array formula, so it must be entered into a range at once using Ctrl+Shift+Enter.
This is the quickest way to return database results into Excel, but it limits your options for altering the query.
Syntax
XL3TableArrayLookup( Connection, Sql, [HeaderHandling] )
Parameters
Parameter | Description |
Connection | Connection number to use |
Sql | The query to run. Typically from a cell so that the query can be updated. |
HeaderHandling | Optional, how to output headers:
|
Example
In this example, you have a SQL statement in cell A1. Select the range you want to output the results to and type: Select * From Person.ContactType
Then press Ctrl+Shift+Enter.

Any cells outside the data area return #N/A. The date column has also been formatted.