Check out our other answers here https://youtube.com/playlist?list=PLNIs-AWhQzcluqE43JKakRKslaYwCouJu

Get files here https://www.wiseowl.co.uk/vba-macros/videos/vba-ado-net-recordsets/vba-adodb-csv/

If you'd like to help fund Wise Owl's conversion of tea and biscuits into quality training videos, you can click this link https://www.wiseowl.co.uk/donate?t=1​ to make a donation. Thanks for watching!

Learn how to extract the contents of a CSV file into an Excel workbook without opening the CSV file. You'll learn how to use ActiveX Data Objects connections and recordsets to connect to a closed file and how to write basic SQL queries to return the information from the file.

Chapters
00:00 The Question
00:53 Opening a CSV File as a Workbook
01:41 The ActiveX Data Objects Library
02:57 Creating a Connection String
06:00 Selecting Data from a CSV file
07:58 Copying Recordset Data into a Worksheet
09:45 Basic Union Select Queries
11:00 Looping Through CSV Files in a Folder
13:58 Building a Select Statement
16:20 Removing the Extra Union Keyword
17:43 Writing the Results to the Worksheet
18:18 Getting the Column Headings
19:49 Removing the Byte Order Mark Characters
21:24 Sorting the Query Results
22:34 Adding Criteria to the Query

Visit www.wiseowl.co.uk for more online training resources in Microsoft Excel, Power BI, DAX, SQL Server, Reporting Services, Analysis Services, Integration Services, ASP.NET, C#, Visual Basic, Microsoft Access and more