Export query data in a specific font

G

Guest

When exporting query data from Access to Excel, the font is always defaulting
to MS San Serif in Excel, even though we have the default font in Excel set
to Arial. Is there a way to make the font export as Arial?
 
G

Guest

The font in the table is set at Arial 10, but it still exports to Excel as MS
Sans Serif.
 
K

Ken Snell \(MVP\)

Hmmm.. I hadn't paid attention to this before.

MS Sans Serif is the default font built into ACCESS. I don't know of a way
to change it for exported queries other than to export into a formatted
spreadsheet (one where the font is set to the one you want) or to use
Automation to open the spreadsheet after the export and change the font
then.

Sorry.
 
G

Guest

I haven't specially set the font in any automation code, but found this.
Hope it helps -
(my code
Dim Xl As Excel.Application
Dim XlBook As Excel.Workbook
Dim XlSheet As Excel.Worksheet)

With XlSheet
.Cells.FormatConditions.Item.Font.FontStyle
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top