Solved

Formatting lost when exporting from Access to Excel template

Posted on 2013-11-06
2
799 Views
Last Modified: 2013-11-11
I am using TransferSpreadsheet in Access 2010 to export data from a pass through query to an Excel worksheet which has been preformatted with specific colors, column sizes, etc.  This usually works fine but sometimes the formatting is not preserved.  Is there anything I can do to guarantee that the formatting will not be changed?

Note:  I use vba code which always runs the TransferSpreadsheet the exact same way, exporting to the same target worksheet and the same range name.
0
Comment
Question by:DrLechter
  • 2
2 Comments
 
LVL 61

Expert Comment

by:mbizup
ID: 39628801
The transfer spreadsheet command itself gives you no control over the formatting.

You can use Excel Automation (VBA) to format Excel sheets after running Transfer Spreadsheet... or even use automation for the whole thing - Export and formatting.

The upside is that it is essentially opening Excel from Access, giving you all of the bells and whistles that Excel offers through programming.  The downside is that it can be very code intensive, with a significant learning curve.
0
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
ID: 39628807
Take a look at the HiTechCoach's site here:
http://www.hitechcoach.com/index.php?option=com_weblinks&view=category&id=84%3Aaccess-vba-office-automation&Itemid=23

The top two articles in the list will give you an idea of how automation works... importing and exporting.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now