export data to existing Excel file

  • Thread starter Thread starter Rasta
  • Start date Start date
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
 
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.
 
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?
 
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"
 
Back
Top