Application.Query
This function creates a composite spreadsheet using SQL SELECT statement syntax; implicit {SELECT * FROM} is allowed. Table names: quoted file paths or names (for spreadsheets located in DataSources, ';,'-separated list of folders). Useful for multi-table merge/subset/sort.
| Syntax | Parameters | Return Value |
|---|---|---|
Function Application.Query( _
SQLSelectStatement As String, _
Optional ListOfFoldersContainingTheDataSources As String = "") As Spreadsheet
|
Type: String
Type: String Default value: "" |
Spreadsheet |
SVB Example
Running a query:
Option Base 1
Option Explicit
Sub Main
Dim ss As Spreadsheet
Set ss = Application.Query("SELECT * FROM CHARACTERISTICS", Application.Path & "\examples\datasets\")
ss.Visible = True
End Sub