Thanks but it seem a bit too complicated for me. You see my big
problem is that my tables display their data in a way while the
spreadsheet will display records in a portrait way. I have tried to
run a crosstab query but it does not return what I want.
Could you just help me with some code example?
Let's say I have two tables: TBL1 and TBL2.
These tables have 4 fields each: DATE, RECEIVED, CLEARED, PENDING.
Data is displayed in the tables as follows:
DATE RECEIVED CLEARED PENDING
01/03 12 23 0
02/03 55 22 4
03/03 45 53 2
My spreadsheet in Excel is named CLIENTS
Data will need to be exported in a pre-formatted spreasheet as
follows:
DATE JAN FEB MARCH
RECEIVED 12 55 45
CLEARED 23 22 0
PENDING 0 4 2
These are the spradsheet cells:
DATE JAN FEB MARCH
RECEIVED B2 C2 D2
CLEARED B3 C3 D4
PENDING B4 C4 D5
I know this seems crazy but I have no choice.
Conclusion: I need some code that reads exports at the same time the
data in the same spreadsheet.
Any further help will be appreciated. Thanks.
pi********@hotmail.com (Pieter Linden) wrote in message news:<bf**************************@posting.google. com>...
jp***@tin.it (Paolo) wrote in message news:<9f**************************@posting.google. com>... Friends,
I need help with some code to export different tables to a single
spreadsheet in Excel.
My excel file is named REPORT and the spreadsheet is named CLIENTS.
I do have the code to export a single table to Excel but have problems
with multimple tables.
Thanks.
Paolo,
use the code at www.mvps.org/access to do this. You could pass the
contents of the table as a recordset to Excel and then put it wherever
you want through automation. You'd just call the code once per table
and tell Excel where to put the data.