Wise Owl Answers - How do I get data from a closed Excel file using VBA?

preview_player
Показать описание


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

Рекомендации по теме
Комментарии
Автор

Your explaining is complete and wonderful, thanks.

youssefsedkey
Автор

I followed your instructions explicitly and it worked great! Thank you for your videos.

thomaskelley
Автор

I have been resistant about doing data extraction stuff outside the usual Excel method (open the source file, copy things over, close source file) because the tutorials are usually abstruse and frustrating. But this video is crystal clear and you go through the steps at the appropriate level of detail and with the right pacing for me to follow. Excellent stuff! Thank you, thank you.

CQXRay
Автор

Sir, your lectures are perfect!!!! THANK YOU SO MUCH!!!!

MasterChelsea
Автор

Dear Wise Owl Highly appreciate the way you explain, its just Excellent.

ab
Автор

I had been looking for this for years.

Thank you so much.

oleksijm
Автор

Thanks! I have been looking around for these for the whole day!

chmytoj
Автор

Wow! Just wow! Excellent material and demonstration. I'm going on 60 and been writing VBA and Studio for about 5-6 years now. To see other examples and styles of coding is so enlightening. Thank you!

emcsquare
Автор

Great tutorial, the best vba on YT, Thank you Andrew

janezklun
Автор

Very nice and interesting. Wonderfully explained. Thank you.

RohithKK-uhpp
Автор

Greatest tutorial ever on this topic 👍👍

hadireg
Автор

👍🏻Thanks a lot.. exactly what i was looking for. Very nicely explained in simple manner

jassi
Автор

Nicely done. Worked perfectly. Thank you

gregggordon
Автор

I have learned excel and VBA using your

safeerahmed
Автор

Really amazing tutorial. Thanks a lot.

KhalilYasser
Автор

Great video! Thanks for sharing and Thumbs Up!!

Victor-ollo
Автор

Very Extortionary and power full . Next month i will get promotion

naiduvikas
Автор

WOW that was really really well explained, thanks so much!

andrewwest
Автор

For this video you get at least one Oscar!

robertbendkowski
Автор

You are amazing. You explained everything step by step 😍.

AmitMishra