I’m querying a SQL db from excel using vba, that all works fine but it also returns and displays the SQL columns headers in the excel sheet. Like this:
AssetTag Machine Name UserName Current Site Run Count Defered
AssetTag MachineName UserName CurrentSite RunCount DeferCount
B33CWM1 QRLXPB33CWM1 admin-03 QR 255 3
Is there a way to get VBA not to display the SQL Column headers?
If you use ADO to create a recordset, you can use CopyFromRecordset in Excel. This does not include headers.