- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsI dont know if the following can be achieved but will like to experiment it. I have seen lots of sample code for transferring Ms.Access query to Ms. Excel right here through EE search engines
Any assistance in achieving the following results will be appreciated.
(1) Assume that Path for the template is C:\Dev\Test\Excelsample.xl
....while Destination path is C:\Destination\Excelsample
Export Access query (qryTest) to Excel template (Excelsample.xlt) --see below with DataSheet1
as the worksheet name.
If previous file of Excelsample.xls is found in C:\Destination, delete it then start a new file.
When a new file is created at C:\Destination, for example...add and multiple templates of
the .xlt ay be used, write one template after the other until data is exhausted all in one file
that was created (that is:Excelsample.xls as discussed under question #(2) below
(2). Access Query data should start from line 5 item #1 and numbered through item # 22.
Begin to fill new qryTest data using another template from line 5 again as designed
and number new template this time from Item #23 through 44.
If qryTest still has more data start a new Excel template from item #45...and so on and so forth
until all data has been printed to Excel.
Assuming the template is as follows:
A B C D E F G H I J K L
1. Title: Company Assets
2. Quarter: 3
3. Item No Application Length Area Equipment Purchase
4 Date Type Date
5. 1 02/24/08 3/4 14 Desk 11/23/99
6. 2 10/20/07 1-1/2 67 Lamp 12/26/07
7. 3 .........etc....etc...etc.
8. 4
9. 5
10. 6
As you would note here, Access Query fields are as follows in EXCEL format
Item No A3:A4 stretched through B3: B4
ApplicationDate C3: C4 -------- Ditto ------ D3: D4
Length E3: E4 ------- Ditto------- F3: F4
Area G3: G4 ------- Ditto-------- H3: H4
Equipment Type I3: I4 ------ Ditto ------- J3: J4
Purchase Date K3: K4 ------- Ditto ------- L3: L4
This question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership