What is ReqPro? Why not simply keep count of how many rows you've written so far, and create a new workbooksheet and resume writing to that when you get close to the limit? Are you sure storing so much information within Excel is wise? What are you going to do with it once it's stored there?
Update: s/book/sheet/
| [reply] |
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.
| [reply] [d/l] |
The limit is 65,535 but I would stop well short of that.
Remember that Excel also provides for “external data ranges” that can come from almost any source and can be of almost any size... You can prepare information for this use with your Perl script, in a wide variety of formats, and the resulting presentation is very nice.
| |
$sheet->Range("$column$line")->{'Value'} = $myValue;
In that case it would be easy to check if your variable $line is > 60.000 ... no need for counting
HTH, Rata | [reply] [d/l] [select] |