• I do a lot of extracting data from SQL Server for displaying in Excel.
    What I have found work best is to use ExcelDNA (https://excel-dna.net/) to provide an intermediate C# layer to a) do the SQL query, and then b) format then returning the result as a 2-D object array.  ExcelDNA allows you to create both Functions (static methods) that called directly from the sheet and self-registering COM objects that can be created and called from VBA.