expoerting data to excel

G

Guest

I am trying to export a query result and a table from access 2002 to excel
2003 in .xls format. I then have an excel template that is linked to these
two output .xls files. When I export them manully from the access db menu,
the files export and my template links to them properly. If I use a macro to
export the files, I get an error in my template (can't read file) when I try
to link them. Why would the output be any different.
Thanks
 
J

John Nurick

Exporting in a macro, you have the choice of
(a) OutputTo and
(b) TransferSpreadsheet (which has several options of its own for
different versions of the XLS format).

Exporting them manually, you have the choice of

(a) Tools|Office Links|Analyze with Excel;

(b) File|Export, and then selecting one of several versions of the xls
format and working through the export wizard.

You can get the same results from manual and macro, but you have to
ensure that you're using the equivalent options. Basically,

1) TransferSpreadsheet and File|Export are equivalent provided you do
NOT check "Save Formatted" and you select the same version of the Excel
format for each.

2) OutputTo, Analyze with Excel and File|Export with "Save Formatted"
checked are equivalent - and always use an older version of the Excel
format.
 

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