473,400 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

Code to Export Multiple Tables to Excel

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.
Nov 12 '05 #1
4 14724
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.
Nov 12 '05 #2
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.

Nov 12 '05 #3
jp***@tin.it (Paolo) wrote in message news:<9f**************************@posting.google. com>...
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.

Paolo,
so what happens if you create a crosstab query in Access, and then use
the code from mvps.org to open the query recordset and paste the
contents into Excel?
Nov 12 '05 #4
OK. It just does not group the data as I want. Do you have a practice
Example or Can I send you a sample of a table and spreadsheet? 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>...
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.

Paolo,
so what happens if you create a crosstab query in Access, and then use
the code from mvps.org to open the query recordset and paste the
contents into Excel?

Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: RichpU | last post by:
Hi Everyone, I am trying to export a group of tables to an excel workbook and I would like to export table 1 to sheet 1, table 2 to sheet 2 etc. I am using <%Response.ContentType =...
3
by: Gaffar | last post by:
Hello, how to export ms-access tables information to excel sheet using ASP. please give sample code. it is very urgent to me or if u have no idea please give any news group to solve my...
4
by: Agnes | last post by:
I can export the data to excel, but it is really really slow. need 5-6 mins to export 30 fields (a hundred records) . for my old vfp application, less than 3 minutes. for 500-800 records. Does any...
4
by: paul.chae | last post by:
I have a table in Access with about 3000 records. There are ~60 unique values in the ID field for the 3000 records. What I would like to do is automatically generate multiple Excel worksheets...
3
by: Sachin Salgarkar | last post by:
I have a DataSet that I need to export to Excel. The dataset has multiple tables. I need a way to export the complete dataset to a single Excel Workbook with sheets for each table in the dataset....
7
by: Vanessa | last post by:
hi Everyone, I have two questions on exporting data to Excel using ASP (w/o converting formatted excel file into web page and then plug in the dynamic data): 1. Can we export data into...
1
by: smaczylo | last post by:
Hello, I've recently been asked to work with Microsoft Access, and while I feel quite comfortable with Excel, I'm at a complete loss with databases. If someone could help me with this issue I'm...
2
by: hal | last post by:
Hello all, I've been searching all day for an article or tutorial on how to get data from a SQL Server 2000 database and export the data to excel 2003 so that multiple worksheets are created,...
3
by: yovation | last post by:
Hi, I have a 3 table database. 1 parent 1 child 1 child of child I would like to get the data into excel as 1 sheet (similar to a grouped report).
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.