Wise Owl Answers - How do I get data from a closed Excel file using VBA?
Check out our other answers here https://youtube.com/playlist?list=PLNIs-AWhQzcluqE43JKakRKslaYwCouJu
Download files here https://www.wiseowl.co.uk/vba-macros/videos/vba-ado-net-recordsets/copy-from-closed-workbook/
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!
One way to get data from a closed Excel workbook is to open it first, but did you know that in VBA you can connect to a workbook and extract data from it without needing to open the file? This video explains how to do this using the ActiveX Data Objects library. You'll learn how to create a connection object and construct a connection string to talk to the closed Excel file. You'll also see how to create a recordset object and load a set of data into it using an SQL Select statement. As a bonus, the video shows you how to add some basic criteria to the SQL query to control which rows of data you return from the workbook.
Chapters
00:00 The Question
01:40 The ActiveX Data Objects Library
02:46 Connecting to a Closed Workbook
08:13 Selecting Data into a Recordset
10:33 Copying Data from a Recordset
11:28 Tidying up the Worksheet
12:51 Copying a Specific Range of Cells
13:33 Returning Specific Columns
14:53 Returning Columns Without Column Headers
16:55 Adding Criteria to a Query
18:00 Combining Criteria
19:10 Using Wildcards
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
Видео Wise Owl Answers - How do I get data from a closed Excel file using VBA? канала WiseOwlTutorials
Download files here https://www.wiseowl.co.uk/vba-macros/videos/vba-ado-net-recordsets/copy-from-closed-workbook/
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!
One way to get data from a closed Excel workbook is to open it first, but did you know that in VBA you can connect to a workbook and extract data from it without needing to open the file? This video explains how to do this using the ActiveX Data Objects library. You'll learn how to create a connection object and construct a connection string to talk to the closed Excel file. You'll also see how to create a recordset object and load a set of data into it using an SQL Select statement. As a bonus, the video shows you how to add some basic criteria to the SQL query to control which rows of data you return from the workbook.
Chapters
00:00 The Question
01:40 The ActiveX Data Objects Library
02:46 Connecting to a Closed Workbook
08:13 Selecting Data into a Recordset
10:33 Copying Data from a Recordset
11:28 Tidying up the Worksheet
12:51 Copying a Specific Range of Cells
13:33 Returning Specific Columns
14:53 Returning Columns Without Column Headers
16:55 Adding Criteria to a Query
18:00 Combining Criteria
19:10 Using Wildcards
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
Видео Wise Owl Answers - How do I get data from a closed Excel file using VBA? канала WiseOwlTutorials
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![Wise Owl Answers - How do I get data from multiple closed Excel files using VBA?](https://i.ytimg.com/vi/Q1zhMFAWgg0/default.jpg)
![Excel VBA Introduction Part 25 - Arrays](https://i.ytimg.com/vi/h9FTX7TgkpM/default.jpg)
![How to use ADO and VBA to Read from Worksheets](https://i.ytimg.com/vi/L0I24NGrUtc/default.jpg)
![Wise Owl Answers - Why Do We Write If Not Is Nothing in Excel VBA?](https://i.ytimg.com/vi/Dn9Sw1XNJeE/default.jpg)
![Excel VBA Introduction Part 58.6 - SQL for Excel Files - Text Criteria and the Like Operator](https://i.ytimg.com/vi/AyQyNogNFx0/default.jpg)
![](https://i.ytimg.com/vi/1oMAUnI51N4/default.jpg)
![Excel VBA Introduction Part 15 - Do Until and Do While Loops](https://i.ytimg.com/vi/wGauctajWPQ/default.jpg)
![Wise Owl Answers - How do I copy data without using copy and paste in Excel VBA?](https://i.ytimg.com/vi/irFsV7dvXp0/default.jpg)
![Excel VBA: The Magic of the Worksheet Change Event](https://i.ytimg.com/vi/TYyPrqqFgVg/default.jpg)
![How To Copy Multiple Excel Ranges To Word Using VBA](https://i.ytimg.com/vi/giYw24-XZao/default.jpg)
![Excel VBA Introduction Part 57.2 - Basic Web Scraping with Selenium and Google Chrome](https://i.ytimg.com/vi/y7yWL0oCB3k/default.jpg)
![Wise Owl Answers - How do I populate a listbox using an ADO recordset in VBA?](https://i.ytimg.com/vi/Afrwf_P-NII/default.jpg)
![Wise Owl Answers - How do I hide all but the selected sheets in Excel?](https://i.ytimg.com/vi/Sa9gBLusDmY/default.jpg)
![Wise Owl Answers - How do I loop through sheets in multiple closed Excel files?](https://i.ytimg.com/vi/Fsrw0X9hI18/default.jpg)
![Excel VBA to Copy/Move Data Within Sheet, to Another Sheet or Another Workbook](https://i.ytimg.com/vi/2n2qaT6KuH0/default.jpg)
![Excel VBA Introduction Part 58.8 - SQL for Excel Files - Conditional Functions](https://i.ytimg.com/vi/cRod3Riw3IM/default.jpg)
![VBA to BROWSE & COPY Data from SELECTED File in Excel](https://i.ytimg.com/vi/h_sC6Uwtwxk/default.jpg)
![Consolidate Multiple Sheets into one Excel Sheet using Simple 13 line VBA Code](https://i.ytimg.com/vi/jT56JeezKF0/default.jpg)
![How to Use Arrays Instead of Ranges in Excel VBA](https://i.ytimg.com/vi/JzALsdQvjr8/default.jpg)
![Excel VBA Introduction Part 58.19 - SQL for Excel Files - Inner Joins](https://i.ytimg.com/vi/INQ3cz9LTWk/default.jpg)