Using CopyFromRecordset
This chapter focuses on using the ADO and DAO object libraries to bring data from a database into an Excel workbook. Most of the material concerns fine-tuned activities, such as using VBA code to find the exact location that data needs to occupy on a worksheet. Often, though, you're less interested in picking and choosing among records and putting a field value in a particular location, and more interested in copying a lot of data very rapidly.
You could use an external data range, if you wanted to, as described in Chapters 4, “Importing Data: An Overview,” and 5, “Using Microsoft Query.” Refreshing an existing data source is a speedy process. But you usually set up an external data range manually, starting with Data, ...
Get Managing Data with Microsoft® Excel now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.