PDA

View Full Version : Copying data from DB in a Sheet



avadhutd2
08-11-2009, 04:50 AM
Hi,

I need one help about copying data in excel sheet from database after executing a query.

I have a query with me ...for example
select xyz, abc, rst from DBNAME

After execution of the query I could see thousands of values in a DB.

My requirement is getting these values in a excel sheet from Row# 2 as per field names. That is...in the excel sheet (say Sheet 2) I need to get -

xyz abc rst
** ** **
** ** **
** ** **
** ** **
.
.
.
.

etc.

Can any one guide me in this regard to build the logic?

Thanks :help

Bob Phillips
08-11-2009, 05:13 AM
Use CopyRecordeSet to dump it into the worksheet.