Exporting data to excel from access

nh1234

Registered User.
Local time
Today, 15:02
Joined
Dec 27, 2005
Messages
26
hi,

I am trying to export specific information from access to excel, but to a specific file, sheet and cell?

Is there a way to do this and if so how?
 
nh1234 said:
hi,

I am trying to export specific information from access to excel, but to a specific file, sheet and cell?

Is there a way to do this and if so how?

Hi,

I have included a very short example of a database that allows you to do what you want. What it does is:

  • allows you to set the directory & filename you want to use
  • export data to specific cells
  • save & close the spreadsheet

What I have it do is run excel invisibly whilst it is entering the data as from my experience people like to click on things when it's running and it always stuffed things up! Therefore I made it run invisibly so they couldn't do anything until after it had been generated. So you will see I have two functions, openexcel & openexcel_visible. The first one is what I use to open and not show Excel. The second I use at the end of the procedure to open the completed file and show Excel. It's saved me a lot of hassle.

Here are some pointers from the MS MSDN website:

How to Reference Cells and Ranges [Excel 2003 VBA Language Reference]
Selecting and Activating Cells [Excel 2003 VBA Language Reference
Cells Property [Excel 2003 VBA Language Reference]

Here is a handy link to a post on this forum on this subject:
Exporting to a specific excel spreadsheet, and a specific worksheet/cells

Hope this helps.
 

Attachments

Users who are viewing this thread

Back
Top Bottom