PC Review Forums Newsgroups Microsoft Access Microsoft Access Solution: Error 2306: There are too many rows to output (Access to Excel using OutputTo)

Reply

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

 
Thread Tools Rate Thread
Old 02-07-2007, 06:25 AM   #1
jshunter@waikato.ac.nz
Guest
 
Posts: n/a
Default Solution: Error 2306: There are too many rows to output (Access to Excel using OutputTo)


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

  Reply With Quote
Old 03-07-2007, 03:45 AM   #2
Allen Browne
Guest
 
Posts: n/a
Default Re: Solution: Error 2306: There are too many rows to output (Access to Excel using OutputTo)

Thanks for posting the solution, John.

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

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<jshunter@waikato.ac.nz> wrote in message
news:1183350300.947968.316670@i13g2000prf.googlegroups.com...
> 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

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off