Can I export data from a database into excel using a mail merge?

G

Guest

My office sends out a yearly time sheet in excel to each employee. Everyone
has a unique record. We record several fields for each timesheet-- years
worked, annual/sick leave balances, full time status, etc. All of this
information is kept in a database (excel/access)

Each year we need to enter this information for each employee, one record at
a time. We need to save each record individually and then mail out.

Is it possible to export data from a database into an excel file? I imagine
that it would be similiar to importing data into a word file using mail
merge. Does this feature exist in excel? Any tips/advice?
 
G

Guest

Yes, it is possible. You would use the TransferSpreadsheet method. You can
find information on it in Access Help.
The issue you will have to deal with is that the TransferSpreadsheet loads
all the data in the source table or query at once to one worksheet. It is
also just a column by column dump of what is in the table or query, so it may
not be formatted in a presentable manner.
There are a number of ways to accomplish presenting a sheet to each employee
with that employee's data. One would be to write a VBA module that would
create a workbook with a sheet for each employee, format the sheet, and put
the data in. This is a little advanced, but the most controlable way to do
it.
Another approach would be to use MSQuery in Excel. For this approach, you
would create and format a sheet for each employee. You could then embed a
query in another sheet that would pull the data for all employees from
Access. Then on the sheet for each employee, you would have to put
references and lookups to get the data from the worksheet with the data.

I hope this response has not been depressing or intimidating.
 

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