Solution: Error 2306: There are too many rows to output (Access to Excel using OutputTo)


J

jshunter

I've joined the legions who've encountered this problem with the
OutputTo method in Access:

Run-time error 2306
There are too many rows to output, based on the limitation
specified by the output format or by Microsoft Access

A lot of people seem to have encountered it. The reason is because
OutputTo defaults to an old version of Excel which only allows 16K
rows

A lot of people also suggest using TransferSpreadsheet instead, but
that caused me a lot more problems (putting a single quote in front of
my text data)

Intellisense for the command does not list what your options are for
the FormatType, and the online Help doesn't mention it either, simply
giving "acFormatXLS" as the only Excel option

But there is a solution: use "acSpreadsheetTypeExcel9"

E.g. DoCmd.OutputTo acOutputQuery, "My Query",
acSpreadsheetTypeExcel9, "C:\Document\MyFile.xls", True

BTW I'm using Microsoft Access 2003 SP2

--John Hunter
 
Ad

Advertisements

A

Allen Browne

Thanks for posting the solution, John.

Hopefully this will help someone who is searching on this issue.
 

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

Similar Threads


Top