Access Query Results To Excel

H

HatesTheCold

Is there a way to export Query Results to a pre-existing Excel Workbook?
Specifically, can I take the results of a Query and have them populate a
given range in a specified worksheet?

Thanks for your help.
 
F

fredg

Is there a way to export Query Results to a pre-existing Excel Workbook?
Specifically, can I take the results of a Query and have them populate a
given range in a specified worksheet?

Thanks for your help.

You can use the TransferSpreadsheet method to transfer the query to
Excel, but you cannot specify a specific range to place it in.

A workaround is to transfer the data (it will go to a worksheet of the
same name as the query, or create a new worksheet with that name).
Then use code within Excel to cut and paste to the desired range.
 
R

Rosco

In addition, you can run your query from within Excel and return the results
to a specified range in your workbook, by using MS Query in Excel.

Rosco
 
M

margaret bartley

There are a number of MS articles on Office Automation, that give you the
code
to open an Excel application from Access, open a specific .xls document,
select a range, and send your data there.

I don't have a specific references, but the search words "Access", "Excel",
"Office automation","range" should narrow your search to articles with a
high relevancy to your needs.
 
Top