473,763 Members | 7,044 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Export Access Query to a formatted Excel sheet

11 New Member
I have an access report based on a bunch of queries that does a quarterly summary of some research related stats. Now my boss wants this report to export into excel based on a specific format she has developed. This formatted excel sheet also needs to keep all previous quarters information stored in it and just add subsequent quarters. I don't know where to start!
Jul 23 '08 #1
2 5334
Stewart Ross
2,545 Recognized Expert Moderator Specialist
Hi. You may get some ideas of how to open and write to Excel by having a look at post 6 of this thread, which shows two VBA subroutines replacing the TransferSpreads heet method to output to an existing Excel workbook instead of a new blank workbook.

In your case you are almost certain to have to write record values directly to Excel rather than outputting the whole recordset as shown in the above thread. You would need to learn how to refer to individual cells in Excel using the current active worksheet and the Cells method. Another thread shows examples of this and is linked here.

As you wish to retain previous worksheets it also means copying and pasting worksheets within the workbook. All this is easy enough once you understand the Excel object model; I'd suggest, though, that the development task is likely to take a bit longer than your boss thinks it will whilst you get to this stage!

-Stewart
Jul 24 '08 #2
ezra
11 New Member
Thanks. I'll check these post out and see what happens.

Hi. You may get some ideas of how to open and write to Excel by having a look at post 6 of this thread, which shows two VBA subroutines replacing the TransferSpreads heet method to output to an existing Excel workbook instead of a new blank workbook.

In your case you are almost certain to have to write record values directly to Excel rather than outputting the whole recordset as shown in the above thread. You would need to learn how to refer to individual cells in Excel using the current active worksheet and the Cells method. Another thread shows examples of this and is linked here.

As you wish to retain previous worksheets it also means copying and pasting worksheets within the workbook. All this is easy enough once you understand the Excel object model; I'd suggest, though, that the development task is likely to take a bit longer than your boss thinks it will whilst you get to this stage!

-Stewart
Jul 24 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
5144
by: Keon | last post by:
Hoi, I'm using a database with alot of records in 1 table (more than 3000). If i want to export this table to excel i only get it till record 2385. Do someone know how i can solve this probleme? To export my tables i use folowing code: StTotaal = stLocatieName & "\Archief\" & Year(Date) & Month(Date) & Day(Date) & "_Gegevens.xls" 'location and name where the table must be saved
3
25042
by: sam | last post by:
Can you teach me how to export access file to excel file in VB.net? Thank in advance.
5
31923
by: Simon | last post by:
Dear reader, With the export command you can export a query to Excel. By activate this command a form pop's up with the following text:
3
7989
by: austin1539 | last post by:
I am trying to run an Access query from Excel. The query, called "ProdActs1" works in Access and is run from using information from a table called "Queries". When a button is clicked in Excel, data currently in the table is deleted and new data is sent based on cell value on the Excel worksheet. So far, I can delete the old records and add new data. I just cannot seem to return results from the query "ProdActs1". Also, is it possible to specify...
3
6351
by: Remaniak | last post by:
Hi All, I use the code below in my form to filter data. But I also need to export the data to excel. So I'd like to create a temporary query based on the strWhere and export that query to excel. Could anyone modify the code for me? cheers Michiel
1
10502
by: CoolFactor | last post by:
MY CODE IS NEAR THE BOTTOM I want to export this Access query into Excel using a command button on an Access form in the following way I describe below. Below you will find the simple query I am trying to export to Excel using a command in an Access Form. RowID strFY AccountID CostElementWBS 1 2008 1 7 2 2008 1 7 I want to...
2
2080
by: Comandur | last post by:
Hi, I am trying to export an access query to excel. I have made use of transferspreadsheet command to achive this. However i have hardcoded the path and the filename in the VBA code. I am not sure as to how i can make the user enter his ownfile name and select the location where the file is to be written. I am attaching below my code: Private Sub Report_Click() On Error GoTo Err_Report_Click Dim db As DAO.Database
6
9694
by: gmujjain4902 | last post by:
Hi, Please help me with code for to Export HTML table to Excel sheet using javascript without using ActiveX controls... The problem is i could get solution for my problem via ActiveX control but our client is not agreed on that. Thnx in advance
2
2741
by: Amin Bardai | last post by:
How about this: I want to export results of an MS-Access query into an existing XLS template using TransferSpreadsheet method? I can create a new XLS file but I just want to append records from my query into an existing XLS template.
0
9563
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10144
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9997
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9822
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8821
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3522
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2793
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.