Export Report to Excel

So I have a report that I want to export to Excel using the Wizard Access 2010 provides.  But the font style and size are not being sent into the Excel file.

In other words, the font for a text box on the report is Ariel, but when the resulting Excel file is created the font is Verdana.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The export wizard is very rudimentary... you have no control over the format of the excel file.

Your alternative is excel automation.  See this example:

Automation basically opens Excel and gives you the same full control over the spreadsheet through VBA code that you would get working directly through Excel's user interface.  The trade-off of course is that it can get very code intensive.

For something as minor as the font... I personally would live with the default font in the wizards export.
Are you looking to actually manipulate the exported data using Excel, or simply export it in a non-Access format?

If the latter, try exporting to PDF instead of Excel, which will keep the same layout.
Jeffrey CoachmanMIS LiasonCommented:
Also,...if your only issue here is the font, then in Excel you can run code like this to change all the cells to Arial

Sub AllArial()
    Selection.Font.Name = "Arial"
End Sub

You can set also set this to run from Access after the import, but that would get a little more complicated, ...but it is do-able...


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Rey Obrero (Capricorn1)Commented:
here is how to change the Excel font using Access code

sub changeXLFont()
dim xlObj
set xlObj = createObject("excel.application")
    xlObj.workbooks.open <path to excel file>
    with xlObj
        .selection.font.Name = "Arial"
        .selection.font.Size = 12
    end with
end sub

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.