Full Version: Export Access report to Excel file, do not overwrite existing wo
UtterAccess Discussion Forums > Microsoft® Office > Microsoft Excel
trapperalexander
I have used the OutputTo command for a while and it is very useful. However, I now have several reports which I need to export to a single worksheet within a specific workbook. I am not sure how to accomplish this. I have tried creating code within Excel to re-format all the data from seperate worksheets into a single worksheet but every time I export the report the Excel workbook is written over and my code is gone.

I have also tried TransferSpreadsheet, exporting the recordsource queries and I have the same problem.

I can specify a specific worksheet to export to; is there a way to specify a specific range within the worksheet? OR
Is there a way to keep the transferSpreadsheet or OutputTo commands from deleting the code I write to re-format the worksheets?

Thanks in advance!
theDBguy
Hi Trapper,

Try giving the name of the worksheet in the Range argument of the TransferSpreadsheet method.

Hope that helps...
trapperalexander
Thanks DBGuy!

I have used this before many times but for some reason my recall memory is not functioning correctly today!
theDBguy
You're welcome. That happens to me too, sometimes. Good luck with your project.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.