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

Discussion in 'Microsoft Access' started by jshunter@waikato.ac.nz, Jul 2, 2007.

  1. Guest

    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
     
    , Jul 2, 2007
    #1
    1. Advertisements

  2. Allen Browne Guest

    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.

    <> wrote in message
    news:...
    > 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
     
    Allen Browne, Jul 3, 2007
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. PB

    Run-time error '2306'

    PB, Aug 6, 2003, in forum: Microsoft Access
    Replies:
    3
    Views:
    517
    Steven Burn
    Aug 6, 2003
  2. vtreddy

    Too many rows for Excel output from Access 2000

    vtreddy, Jan 7, 2004, in forum: Microsoft Access
    Replies:
    1
    Views:
    325
    Van T. Dinh
    Jan 8, 2004
  3. Guest

    too many excel rows

    Guest, Jan 16, 2004, in forum: Microsoft Access
    Replies:
    0
    Views:
    281
    Guest
    Jan 16, 2004
  4. Huber57

    Too many many-to-many?

    Huber57, Feb 8, 2008, in forum: Microsoft Access
    Replies:
    10
    Views:
    472
    Huber57
    Feb 12, 2008
  5. SJ

    DoCmd.OutputTo error 2606 too many rows

    SJ, Sep 28, 2009, in forum: Microsoft Access
    Replies:
    1
    Views:
    427
    Jerry Whittle
    Sep 28, 2009
Loading...

Share This Page