By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,490 Members | 1,221 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,490 IT Pros & Developers. It's quick & easy.

OutputTo: Report to Excel gives "The format in which you are attempting..." error.

P: 6
OS: Windows XP SP3
Office 2007 Enterprise with SP2 (12.0.6557.50001) SP2 MSO(12.0.6544.5001)

When using DoCmd.OutputTo and attempting to output a report to Excel, I get the following error:

The format to which you are attempting to output the current object is not available.

Expand|Select|Wrap|Line Numbers
  1. DoCmd.OutputTo acOutputReport, strSource, acFormatXLSX, , False
where strSource is the name of the report.

Researching the error seems to indicate that outputting a report to Excel will only work if SP2 is installed, but I do have SP2 installed.
Mar 8 '12 #1
Share this Question
Share on Google+
2 Replies


TheSmileyCoder
Expert Mod 100+
P: 2,321
Do you have any fields in your report that might not be suitable for export to excel?

I have not myself used the export function much in 2003 (Since it cuts off memo fields longer then 255 chars), so its just a guess.
Mar 8 '12 #2

Expert Mod 2.5K+
P: 2,545
From a check of MSDN it seems you've found a known issue with A2007 (and 2010 - just tested it myself and got same problem). Only answer appears to be to specify acFormatXLS instead of acFormatXLSX. Staggering, really, that acFormatXLSX is not valid for A2007/2010!

You could try exporting the underlying query via the DoCmd.TransferSpreadsheet method instead. Otherwise you are stuck with xls format and therefore 65k rows maximum. Makes no sense at all, does it?

-Stewart
Mar 8 '12 #3

Post your reply

Sign in to post your reply or Sign up for a free account.