Windy.Query

Antonio Nakić-Alfirević · Functions
A package with a single function that allows running SQL queries agains workbook tables.

Windy.Query Description

This package contains a single Excel function called “Windy.Query” that supports running SQL queries against workbook tables. This function is similar to the Query function in Google Sheets, but it supports the full SQL syntax and can run queries that reference multiple tables from the workbook.
SQL Query function for Excel

Example:

The following formula joins two tables and returns the result, including the headers. Whenever the person and department tables change, the results will also update automatically.

=Windy.Query("select * from department d inner join person p on d.ID = p.DptId", true, true)

Summary:

The function accepts a string with a SQL query that can work with tables in the workbook as if they were tables in a database. The function internally uses SQLite to process the data and queries, so you can perform joins, create common table expressions or use any other operations that SQLite supports. Single-cell named ranges can be used as variables (e.g. @myVar).

The function supports automatically updating results when the source tables and variables change. 

Query execution is synchronous and will not block the user interface of Excel.

Parameters:

  • query - the SQL query to execute
  • showHeaders- if true, the function will return headers as the first row of the result
  • autoRefresh - if true, the function will listen for changes in the referenced workbook tables and named ranges, and will update the results as needed

Remarks:

  • The returned results are tabular (2D array), so the dynamic arrays feature (introduced in Excel 365) is required to allow the function to spill results. Older versions of Excel can still use the function, but it must be invoked as an array formula, and the results will not automatically spill.
  • By default, updates are throttled to occur no more than once every 2s. This is controlled by the RTDThrottleInterval setting in Excel. This setting has no native UI in Excel, but it can be changed in VBA by entering e.g. Application.RTD.ThrottleInterval=20 in the immediate window. The interval is set in milliseconds.

Requirements:

  • Windows 7 or higher
  • Excel Office365
  • QueryStorm Runtime

$39.99
Windy.Query
By Antonio Nakić-Alfirević
Functions
A package with a single function that allows running SQL queries agains workbook tables.
Free
Windy.Text
By Antonio Nakić-Alfirević
Kategorija 2
A package of functions for text manipulation.
$5.55
Windy.ExchangeRates.Fixer
By Antonio Nakić-Alfirević
Kategorija 1, Kategorija 2
Currency conversion
Free
Windy.Dates
By Antonio Nakić-Alfirević
Kategorija 2
Convert values to human readable words