output to excel in specific sheet

T

taps54

Can anyone tell me if there is a way to output a query to an excel file in a
specific sheet from the macro page.

I have the query going to C:\directory\file.xls but this creates a new
workbook and I need to overwrite a specific sheet. Wht is the format for
this.

Thanks
 
A

ashfire

output to simply overwrites the file, he's asking if you can overwrite a
single sheet
 
R

Ron2006

The tab that the Access export process uses is the same as the query or
table name that is used to do the export.

I used to be able to repeat exports and have them overwrite that tab,
now it seems to creat a second tab with almost identical name. (If
someone knows the magic clue to stop that I would love to know it.)

Now what I do is first use automation and open the spreadsheet via
Access and make it visible and have the user say yes to the delete of
that tab. Then I do the export.

If the tab needs formatting and I can do that from within Access I then
use automation to do just that.

If the formatting is too extensive then I export it to a different tab
name and then use automation to copy the necessary data from that raw
export tab to the highly formatted tab. If I can't leave the rawexport
tab then I either hide it or make excel visible and have the user say
yes to the delete.

Ron
 

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