|
-
November 13th, 1998, 02:24 AM
#1
Excel automation
Hi!
How can I fill a range of cells on Excel worksheet without moving
from cell to cell and inserting the data into each cell?
Besides I can't use Clipboard to perform such an operation
Thanks for any reply.
Alex.
-
May 30th, 2001, 12:47 PM
#2
Re: Excel automation
Two methods to try:
The CopyFromRecordset method allows you to copy an entire recordset (DAO only for Excel 97, or, both DAO and ADO for Excel 2000 as I've just discovered with Kostas) into any Range object, thus:
MyRange.CopyFromRecordset myrecordset
Or, if you're not using recordsets, you can fill a 2-dimensional string array with your values, then, just tell Excel to make the appropriate range equal to your array, thus:
MyRange = MyArray()
I know that's very general, but if you need anything more specific or can say what software versions etc you're using, let us know. There's also more info' on referring to Range objects etc in the appropriate Help files if you need it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|