export data to existing Excel file

R

Rasta

Is there a way to export data from access to an existing excel file - just
overwriting what's in the excel file rather than replacing the entire file?

thanks
 
J

John Nurick

In general the answer is yes. But the fact you want to do it means you
must want to preserve something in the Excel workbook. What? It's
relevant to how best to do the job.
 
G

Guest

If he won't answer I will. I would like to export the query results to a
"Data" tab in a preexisting Excel File because I have charts and calcs tied
to it. How is this possible?
 
J

John Nurick

Make sure there's nothing else on the Data sheet. Then, something like
this should do it, replacing the table on the Data sheet with the
exported one.

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, _
"MyQuery", "D:\Folder\File.xls", True, "Data"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top