Export data from Access to Specific Excel cells

Posted on 2011-03-23
Last Modified: 2012-05-11

I am currently using a transfer spreadsheet code to export a qry to a specific excel tab, however, I would like to export to a specific "starting" cell.

Question by:kwarden13
  • 3
  • 3
LVL 34

Expert Comment

by:Mike Eghtebas
ID: 35202306
-What version of access your are using?
- Will be the code runing to transfer data from a remote database or from the local database

LVL 34

Accepted Solution

Mike Eghtebas earned 500 total points
ID: 35202329
Generally speading, a code like:

DoCmd.TransferSpreadsheet acExport,...

should do it. But a more relaible method is to define Excel object and assign the desired values in one or more cells in excel.

If you could describe your use, we can choose the best solution for you.


Author Comment

ID: 35202345
the local database

From access 2007 to excel 2007

right now I am using the below code

DoCmd.TransferSpreadsheet acExport, , "qryDelRepCAN", "J:\data\Manager\Test.xlsx", True, "Canada"

Canada is the named range
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.


Author Comment

ID: 35202359
the issues is the named range

So the qry data can either expand or contract depending on the data so I need a dynamic named range. However when I try to do this it still doesnt work
LVL 34

Expert Comment

by:Mike Eghtebas
ID: 35202385
I guess you have another question on this subject.


Author Comment

ID: 35202418
yes i originally thought it was a seperate issue but i think they are linked

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How can I have an Calculator icon for a button? 36 60
Record with #Error 8 29
Excel 2007 Macro to Change Column Formatting 3 33
Copying an open file 3 16
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  ( Here (http…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

766 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question