<font size=2 face="sans-serif">I already have some rough code for Spreadsheet::WriteExcel.
I just need to figure out how to pass it the data. I created a new controller
just to do the Excel piece, I think I should be able to pass the same resultset
to the export routine as I do to the stash for the template code. Just
not sure of the logistics, but I need to do this for multiple pages. </font>
<br>
<br><font size=2 face="sans-serif">I'm thinking I can pass the same $rs
I place in the stash to the export function, have it stuff it into an excel
file and return a uri which I can redirect the browser to.</font>
<br>
<br><font size=2 face="sans-serif">Maybe.</font>
<br>
<br><tt><font size=2>Len Jaffe <lenjaffe@jaffesystems.com> wrote
on 07/02/2012 01:54:28 PM:<br>
<br>
> From:</font></tt>
<br><tt><font size=2>> <br>
> Len Jaffe <lenjaffe@jaffesystems.com></font></tt>
<br><tt><font size=2>> <br>
> To:</font></tt>
<br><tt><font size=2>> <br>
> The elegant MVC web framework <catalyst@lists.scsys.co.uk></font></tt>
<br><tt><font size=2>> <br>
> Date:</font></tt>
<br><tt><font size=2>> <br>
> 07/02/2012 01:56 PM</font></tt>
<br><tt><font size=2>> <br>
> Subject:</font></tt>
<br><tt><font size=2>> <br>
> Re: [Catalyst] Data export question</font></tt>
<br><tt><font size=2>> <br>
> <br>
</font></tt>
<br><tt><font size=2>> On Mon, Jul 2, 2012 at 1:45 PM, Kenneth S Mclane
<ksmclane@us.ibm.com> wrote:</font></tt>
<br><tt><font size=2>> It will just be a dump of the current query results,
possibly a <br>
> whole table, so It will need to create new tabs when they reach 65K
<br>
> since most of my users are still on office 2003. I guess I could use<br>
> Spreadsheet::WriteExcel, I just need to figure out the mechanics of
<br>
> getting the data into the sheetand something to keep track of the
<br>
> number of rows and create new tabs as needed. <br>
</font></tt>
<br><tt><font size=2>> <br>
> # psuedocode </font></tt>
<br><tt><font size=2>> <br>
> $ss = open_spreadsheet()</font></tt>
<br><tt><font size=2>> $i = 0;</font></tt>
<br><tt><font size=2>> $tab = undef;</font></tt>
<br><tt><font size=2>> foreach $row (@rows) {</font></tt>
<br><tt><font size=2>> if ($i % 65000 == 0) {</font></tt>
<br><tt><font size=2>> $tab = $ss.new_tab()</font></tt>
<br><tt><font size=2>> }</font></tt>
<br><tt><font size=2>> add_to_spreadsheet($row, $tab)</font></tt>
<br><tt><font size=2>> $i += 1</font></tt>
<br><tt><font size=2>> }</font></tt>
<br><tt><font size=2>> close_spreadsheet()</font></tt>
<br><tt><font size=2>> <br>
> </font></tt>
<br><tt><font size=2>> L.</font></tt>
<br><tt><font size=2>> -- <br>
> lenjaffe@jaffesystems.com 614-404-4214
</font></tt><a href=www.volunteerable.net><tt><font size=2>www.volunteerable.net</font></tt></a>
<br><tt><font size=2>> Proprietor: </font></tt><a href=http://www.theycomewithcheese.com/><tt><font size=2>http://www.theycomewithcheese.com/</font></tt></a><tt><font size=2>
- An Homage to Fromage</font></tt>
<br><tt><font size=2>> Greenbar: Grubmaster: 2012-2009, Grub
Asst: 2008, Trained: 2007.</font></tt>
<br><tt><font size=2>> <br>
> _______________________________________________<br>
> List: Catalyst@lists.scsys.co.uk<br>
> Listinfo: </font></tt><a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst"><tt><font size=2>http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</font></tt></a><tt><font size=2><br>
> Searchable archive: </font></tt><a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/"><tt><font size=2>http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</font></tt></a><tt><font size=2><br>
> Dev site: </font></tt><a href=http://dev.catalyst.perl.org/><tt><font size=2>http://dev.catalyst.perl.org/</font></tt></a><tt><font size=2><br>
</font></tt>