Exporting to Excel (1 Viewer)

PSURAM

New member
Local time
Today, 18:07
Joined
Jan 13, 2021
Messages
1
Hi,

I have a nicely formatted report in Access (with headers, shading, column widths, etc.) and the customer would like to be able to export the report into a similarly formatted Excel file. Is this possible? I can export the data via the ExportWithFormatting macro but it's not formatted (missing headers, etc.). Is there a way to do this? Keep in mind I'm a novice.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 18:07
Joined
Feb 19, 2002
Messages
30,626
No. The Access export to Excel is pretty much useless.

You can export the data using TransferSpreadsheet and then using OLE automation, format the export to be a nice report. OR, create macros in Excel to format sheet1 from data in sheet2. Save the macro enabled workbook and export to sheet2 and then run the macro.
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 23:07
Joined
Jul 9, 2003
Messages
12,308
I use the excellent code provided by BTAB Developments to send to, and format data in Excel:-


I believe the code is something to do with Bob Larson, formerly a very active and respected member here on access world forums.

I've used the code in a couple of products and in particular to answer a question from an access World Forum member.

This is a video of the answer I provided:-

Export Query into Separate Excel Sheets - Nifty Access​


You can see more about the question and my my modifications to the code on my website here:-

Excel Sheets From Access Table​

 

Users who are viewing this thread

Top Bottom