From your description of the problem, it sounds like you are using Excel as an output format to render the results of some sort of database query.

As Ratazong said, there are almost certainly ways to keep track of how many rows your are writing into your spreadsheet, and if you are exceeding the row limit (2**16 I think), you can issue a warning or start a new sheet.

However, I would question if it is usefull to the end user to get that many results. If the Excell sheet is just a list of all matching records, then most of the time when the end user gets a huge spreadsheet with thousands of results, they will not bother reading past the first page or so, instead, they will refine their query and run it again.

Considering that, I would consider having a query limit, so that if a query returns lots of results, the user gets the first 500 or so, and then a message like Your query returned 631,978 records, showing the first 500. You would need to provide a way for users to show all results if they really needed them, but I suspect that most users would not.


In reply to Re: Error when reach end excel sheet limit by chrestomanci
in thread Error when reach end excel sheet limit by kgnickl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.