Solved

Formatting lost when exporting from Access to Excel template

Posted on 2013-11-06
2
859 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

707 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