Link to home
Start Free TrialLog in
Avatar of DrLechter
DrLechter

asked on

Formatting lost when exporting from Access to Excel template

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.
Avatar of mbizup
mbizup
Flag of Kazakhstan image

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.
ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial