473,756 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Exporting MS Access to Ms Excel with Excel formatting

72 New Member
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.databasejou rnal.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.databaseles sons.com/access-data-to-excel-2.php

Thanks for all your help and advice
TCB
Feb 15 '11 #1
4 9174
pod
298 Contributor
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
Dave Smith
72 New Member
Thats a good idea, let me give that a try
Feb 22 '11 #3
Dave Smith
72 New Member
Thanks POD
Feb 22 '11 #4
CD Tom
489 Contributor
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
2381
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 don't want to be. If you know how to do it, please let me know. Thank you. Hideyuki
1
1908
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 the excel spreadsheet. Thank you, David
5
5434
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 like to be able to import these files into Access or Excel so that they can be sorted. What I plan on doing is adding in commas at the end of each field to create a csv file. What I need to know is how can I easily remove the spaces between...
1
1722
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 to open and modify cells in my spreadsheet, but I don't understand how to select elements of the Access table to export it to Excel. Here is what I have so far: Dim xlApp As Object Dim wkbk As Object Dim Sheet As Object, Cell As Object
2
1928
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
1205
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 info to excel, PDF, Txt...any of the above. but I would like it to be exported in a printable readable manner...i can get it to go to notepad..but in a non-pretty way. please help
1
1354
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 from happening. Thanks Dave
10
24420
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 run an access query to generate the excel sheet with the pre-defined formatting? Thanks in advance.
0
3306
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
4249
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 Excel and run a macro (it's a formatting macro). My issue is that when Access exports the table, it resaves it and I lose the macro (The spreadsheet will be accessible to anyone so I can't just save it in the Personal workbook). When I try to copy the...
0
9455
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
10031
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...
1
9838
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9708
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...
1
7242
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6534
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
5302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3805
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2665
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.