Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default ADO read to and array

I am currently using the CopyfromRecordset function to copy data from an
Access database into Excel worksheets.

The only problem is that I now have a requirement to read the data directly
into an array rather than to a worksheet.

I thought I read something on the forum about this a couple of weeks ago,
but I cannot find it again, any help would be greatly appreciated.

--
Cheers...
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default ADO read to and array


If Not oRS.EOF Then
ary = oRS.getrows


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Deke" wrote in message
...
I am currently using the CopyfromRecordset function to copy data from an
Access database into Excel worksheets.

The only problem is that I now have a requirement to read the data
directly
into an array rather than to a worksheet.

I thought I read something on the forum about this a couple of weeks ago,
but I cannot find it again, any help would be greatly appreciated.

--
Cheers...



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default ADO read to and array

Thanks, I works great, but for some reason it puts into a multi-dimensional
array...
--
Cheers...


"Bob Phillips" wrote:


If Not oRS.EOF Then
ary = oRS.getrows


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Deke" wrote in message
...
I am currently using the CopyfromRecordset function to copy data from an
Access database into Excel worksheets.

The only problem is that I now have a requirement to read the data
directly
into an array rather than to a worksheet.

I thought I read something on the forum about this a couple of weeks ago,
but I cannot find it again, any help would be greatly appreciated.

--
Cheers...




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default ADO read to and array

That is because the data is multi-dimensional, rows x columns

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Deke" wrote in message
...
Thanks, I works great, but for some reason it puts into a
multi-dimensional
array...
--
Cheers...


"Bob Phillips" wrote:


If Not oRS.EOF Then
ary = oRS.getrows


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"Deke" wrote in message
...
I am currently using the CopyfromRecordset function to copy data from an
Access database into Excel worksheets.

The only problem is that I now have a requirement to read the data
directly
into an array rather than to a worksheet.

I thought I read something on the forum about this a couple of weeks
ago,
but I cannot find it again, any help would be greatly appreciated.

--
Cheers...






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default ADO read to and array

Deke wrote:
Thanks, I works great, but for some reason it puts into a multi-dimensional
array...


If the functions in the freely downloadable file at
http://home.pacbell.net/beban are available to your workbook

ary = ArrayReshape(ary, 1, ArrayCount(ary)) will convert it to a 1-D array.

Alan Beban
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Read range to array Arne Hegefors Excel Programming 2 June 12th 07 03:32 PM
Excel, read in an array AustinJames Setting up and Configuration of Excel 4 September 20th 05 03:18 PM
Read a range to an array Microsoft Forum Excel Programming 4 January 23rd 05 05:23 PM
Read comboboxes into array Steph[_3_] Excel Programming 3 August 11th 04 04:40 PM
Read in Array Leigh Excel Programming 1 May 5th 04 09:18 AM


All times are GMT +1. The time now is 06:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"