473,396 Members | 1,764 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,396 software developers and data experts.

Export Data to Excel for Report Printing

I have a user who has been using Excel for a while to keep statistics
and print reports. She finds using it cumbersome because of long
formulas and a lot of copying and pasting.

I have designed a database for her which is intended to make things a
lot easier; however, I don't have a lot of experience with Access and
I find that designing the reports in Access is tedious. I want to be
able to print the reports (which are simply based on queries) from
Excel because I find Excel much easier for the formatting.

I also need this task to happen automatically. For instance, using a
user-interface, she simply clicks on the type of report she wants and
Excel opens up displaying the report exactly as it should be printed
(all the correct formatting, etc.). She then merely has to click
Print in Excel. Of course, it would be good if Excel opened, printed,
and then closed automatically, but I am considering the possiblity
that she may want to modify the report or the page settings on
occaison, although I doubt this.

Is it possible to export the data from an Access query into, for
instance, a pre-formatted Excel template? This would help me greatly.

Any assistance would be much appreciated.

--
Steven Stewart
Nov 12 '05 #1
1 17366
Here's the technique I use for this task using Excel automation from
Access. First, I allow the user to select an Excel template from a
list of templates in a specific folder. The automation code then
launches Excel if it is not already running and instructs Excel to
create a new workbook from the template. All templates have a report
sheet as well as a raw data sheet. The raw data sheet has a macro
that will do much of the work. The Access query or underlying
recordset for a report is then written to the raw data sheet with
field names on the first row. The automation code then runs the raw
data sheets macro.

On the Excel side, the macro can do anything but it commonly creates
named ranges for the data on the raw data sheet so the report sheet
can use formulas to look up and display data. The macro can also use
the named ranges to copy data to the report sheet. Such a macro could
also automatically print the report as well.

If you need more ideas, our product demo on our web site has some
examples and you can download some Excel examples to see the VBA code.
HTH

Rick Collard
www.msc-lims.com
On 6 Nov 2003 07:32:26 -0800, o6***@unb.ca (Steven Stewart) wrote:
I have a user who has been using Excel for a while to keep statistics
and print reports. She finds using it cumbersome because of long
formulas and a lot of copying and pasting.

I have designed a database for her which is intended to make things a
lot easier; however, I don't have a lot of experience with Access and
I find that designing the reports in Access is tedious. I want to be
able to print the reports (which are simply based on queries) from
Excel because I find Excel much easier for the formatting.

I also need this task to happen automatically. For instance, using a
user-interface, she simply clicks on the type of report she wants and
Excel opens up displaying the report exactly as it should be printed
(all the correct formatting, etc.). She then merely has to click
Print in Excel. Of course, it would be good if Excel opened, printed,
and then closed automatically, but I am considering the possiblity
that she may want to modify the report or the page settings on
occaison, although I doubt this.

Is it possible to export the data from an Access query into, for
instance, a pre-formatted Excel template? This would help me greatly.

Any assistance would be much appreciated.

--
Steven Stewart


Nov 12 '05 #2

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

Similar topics

0
by: AHIhelp | last post by:
I have a .Net report that has several parameters that go into it. When the report is run and I try to right-click and use the built in Export to Excel function in IE 6 - it opens up excel and...
6
by: Robin Cushman | last post by:
Hi all, I need some help -- I'm working with an A2K database, using DAO, and am trying to read records into a Crystal Report and then export it to a folder on our network as an Excel...
5
by: Jonny | last post by:
Hello, I have created a button on my form which when pressed does the following : 1) Run a pre-defined Macro, which is picking up a query and running my data to excel. However, I need the...
2
by: Arvind R | last post by:
Hello, how to ask saveas dialog before writing the data to the excel file? right now im able to save in c drive or any other specified location only. any solution will be a great help! ...
2
by: John Walker | last post by:
Hello, Below is my code for exporting a datagrid to Excel. It works fine, but we're going to need to somehow have a report header, user input parameters and system date display at the top of the...
13
by: Hemant Sipahimalani | last post by:
The following piece of code is being used to export HTML to excel. HttpContext.Current.Response.ContentType = "application/vnd.ms-excel"...
0
by: KNN | last post by:
I have created a report in access 2003 using a query. Used some of the fields to display under page header. Used others to display under group headers and used the remaining under detailed...
1
by: JawzX01 | last post by:
Hello All, First, thank you for any help you can provide. I'm trying to do a simple export to excel. I've used the classic code that is all over the internet, and of course it worked without a...
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).
4
by: Tennotrumps | last post by:
I am trying to export a report to excel but the "excel" option is greyed out. I can export the query the report is based on, but not the report. However, if I open the database on another PC I...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.