473,406 Members | 2,312 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,406 software developers and data experts.

Exporting MS Access to Ms Excel with Excel formatting

I’ve read a lot of different article on the internet about being able to export a table from MS Access to Ms Excel.

Problem I’m having is that I don’t know which one would work best for me, so I thought since I’ve gotten such great advice from this form I will ask.

I have a query that updates a table in access.
What I would like to have happen in the export from access to excel

Currently I have a number of queries that updates number of table daily.
Then I manual export the tables to a excel files
Then I spend 15 -20 minutes formatting the excel fine. “I format all the table to excel files that same way.
Once this is done I email it out in excel format to different managers that need to make commits and then email the spread sheet back to me then I import the spread sheets and record there comments.

If at all possible I would like all the files to import into one spread sheet just into different tabs. I have a bout 4 different group.

Below are some of the articles I’ve read about exporting from access to excel.

Looking for any advice example ect

http://www.databasejournal.com/features/msaccess/article.php/3563671/Export-Data-To-Excel.htm
http://www.vb123.com/toolshed/98docs/excelbe.htm
http://www.tek-tips.com/viewthread.cfm?qid=1201057
http://zmey.1977.ru/Access_To_Excel.htm
http://www.databaselessons.com/access-data-to-excel-2.php

Thanks for all your help and advice
TCB
Feb 15 '11 #1
4 9128
pod
298 100+
I sometimes use an excel template, meaning a file that has all the formatting I want, charts and all. In my script I make a copy of this Excel template and save it as a different name and location, then start filling it with data. No formatting required since it is already formatted.

Expand|Select|Wrap|Line Numbers
  1.  
  2.     Dim reportfolder As String
  3.     reportfolder  = "C:\tmp"
  4.     Dim fichier As String
  5.     fichier  = "newreport.xls"
  6.     Dim xlObj As Object    
  7.     Set xlObj = CreateObject("Excel.application")
  8.     Dim fso As Object    
  9.     Set fso = CreateObject("Scripting.FileSystemObject")
  10.     fso.CopyFile Application.CurrentProject.Path & "\templates\report_template.xls", reportfolder & fichier, True
  11.     xlObj.Workbooks.Open reportfolder & fichier
  12.  
  13.     '...script to fill in data
  14.     xlObj.Sheets("Data").Range("a1").Value = " ... "
  15. ...
  16.  
Feb 17 '11 #2
Thats a good idea, let me give that a try
Feb 22 '11 #3
Thanks POD
Feb 22 '11 #4
CD Tom
489 256MB
Dave, did you get this to work? I've tried using it but when I go to fill in the data I get an subscript out of range. I've posted a question with my code but haven't received an answer.

** Edit - NeoPa **
While it is ok to request help and link to another thread with a similar question, it is not ok to divert an existing thread away from the needs of the original question. As such, I felt this could be left as is, as long as I add a link to CD Tom's other thread (Export data from Access to Excel) and make it clear that any responses to this new question in this thread are not welcome.
Sep 8 '11 #5

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

Similar topics

0
by: Hideyuki | last post by:
Hi, I am using asp.net, and I am having a problem exporting datagrid to excel. One column contains numbers such as 123456875468. When this goes to excel, it is displayed as 1.23456E + 11 which I...
1
by: David | last post by:
(dhl) Using 2K. I have a macro that I use "TransferSpreadsheet" to export a table to Excel. The excel file field type is all general. How can I keep the field format in my table to be the same in...
5
by: Tammy | last post by:
I am doing some genealogy research and I have discovered that there is a lot of data available on the web in text format. The problem is that the columns in the files are lined up by spaces. I'd...
1
by: setterst | last post by:
I am quite new to VBA and Access, but I am trying to figure out how to export specific values from a table in Access, so I can save it in a given cell in Excel. I have been able to figure out how...
2
by: Mike P | last post by:
How do you go about exporting data in excel to a C# dataset? Any help would be really appreciated. Cheers, Mike
0
by: Dlangdaman | last post by:
What I am trying to do ...I have a program that keeps the names, numbers, blah blah of customers....this is gui and saves to access. I need a button with code with the capability to export the access...
1
by: Davidsm | last post by:
Hi All, I have written a macro to export data(Query) from access to excel but when it exports the data is changes the decimal places and drops the currency Symbol (R) is there a way to stop that...
10
by: ConnollyS | last post by:
Is it possible to export a report from Access to Excel and keep all the formmating. i.e. Lines, boxes etc... Or do you need to create an excel template and then use a macro or some VB code to...
0
by: Simon | last post by:
Dear reader, How to export a hyperlink field from Access to Excel, so it is also working in Excel. In Excel you have for the Hyperlink to parts: a.. Text To Display
1
by: epifinygirl | last post by:
I am new to VBA writing so bear with me here. I have been searching the web but I keep finding answers in pieces which is more confusing! What I am trying to do is export a table from Access to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.