Transfer data from access to different excel worksheets

G

George

Hello everybody,

How can I transfer data from and Access database to an Excel workbook, in
different worksheets? Shall I first create an "empty" workbook with those
worksheets and then how? (i have already created the required queries)

Please help.

George
 
J

John Nurick

If you use DoCmd.TransferSpreadsheet, you can pass the name of the
worksheet as the Range argument (even though Help suggests you can't).

So just use successive calls to TransferSpreadsheet to export each
query, passing the same filename but a different Range name each time.
 
G

George

Thanks very much John. It works just fine.

Ο χÏήστης "John Nurick" έγγÏαψε:
 
N

Nikos Yannacopoulos

George,

Building on John's reply, just make sure you don't use any "funny"
characters in the sheet names; Excel may support them, but they do not
transfer across, so confine yourself to alpha, numbers and underscores.

HTH,
Nikos
 
G

George

Thank you Nikos

George (Cyprus)

Ο χÏήστης "Nikos Yannacopoulos" έγγÏαψε:
 
Top