Export from Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Every time I export a file to Excel, I need to change the font in the
exported Excel file from Ms Sans Serif to Arial, even though Arial is the
default font in Excel. How/what can I change so that the exported file will
use the Arial font?

I also need to recreate the Header & Footer, although I've created a
Sheet.xlt
template for all new Excel files. Why doesn't the Excel file that's created
when I export from Access use this template, and can I create a template that
it will use?
 
Are you doing this in VBA or just exporting a table using menu commands?

One way to achieve what you want is to work from the other side of the street:
Create your template file. When you get ready to import data, start a new
workbook based on that template, then use Excel's Data | Import and browse to
the .mdb file with the table in it, identify the table and pull it in. Comes
in to my test setup in Ariel, and preserves headers on the sheet.

If you're doing this in VBA code from within Access, just add code to format
the cells in your Excel object's (assuming you have one) worksheet(s) and the
header for them in the code. If you're creating an instance of Excel and a
workbook over in Access code, then you should be able to create the workbook
from the template file also - I do it all the time with some Access
applications that provide reports via Excel for many uses.
 
Back
Top