Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Intermediate
Sep 11, 2001

Quick Recordset Copy to Excel Workbook


One of the most common things VB programmers do with Excel is load data into an Excel worksheet from a Recordset object. The method I see used most often to do this is looping through each column and row of the recordset, placing the values individually into the corresponding cells on the Excel worksheet. However, a far faster and more efficient way takes advantage of the little-known CopyFromRecordset method of the Excel Range object. All you need to use this method is an object reference to the top-left cell of the destination range. Then invoke the CopyFrom-Recordset method for this Range object, passing it the Recordset object you want to load into the worksheet. Here
Rob Bovey
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date