Export Records Into Existing Excel File

B

Brent E

Good day,

I am looking for an access module that will basically export a Query and
ovewrite all existing data in an Excel Spreadsheet from Row 9 on down. I do
not want to overwrite the file completely to maintain formating and header
data. I also have hyperlinks in the Query so is important that the format be
maintained and transferred during the export.

Ideally, I'd like to be able to:
1. Open the Excel file (Sample D:\Data\Datafile.xls)
2. Delete all data from rows 9 to end of data
3. Export the Query results into the corresponding fields in the Excel file.

OR

If is not easy to do this w/ an Access Module, the next steps I can think of
are to export the data and then use an Object variable to control an Excel
marco to do the following:

1. Export the Query using Transfer Spreadsheet to a temp file.
2. Open the Main Excel File, Open the temp file
3. Delete all rows from Row 9 to end in the Main Excel file
4. Copy all rows in temp file
5. Paste data from temp file into Main Excel file starting at Row9

Thanks for your assistance,
 
P

Pete D.

What you want to do is not toooooooo tough but you might want to ask
question in a excel group instead of access. I would pull the data from
access instead of push it to. Folks that use excel frequently pull the data
from many sources so they would be able to provide you a solution easier.
Can you do it from access, sure but you would have to make access talk excel
which would be a little bit harder. I would post to
microsoft.public.excel.programming to get your answer.
Pete D.
 

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