On Tue, Jul 2, 2013 at 9:29 AM, Craig Chant <[email protected]>wrote:
> >> All the above seems overkill. I suspect what you want is closer to > this: (but see notes below). > > > > Tried that, didn’t work, ended up in a long Catalyst discussion where it > was worked out that I needed to wrap any XLS output to an IO:FILE handle > otherwise Catalyst dies with an “out of memory” error something to do with > streaming data support issues in Catalyst so the work round is to wrap the > output into an IO:File object. > $xls is a scalar you have in memory of the comma separated value data? > > > >>Second, be aware that $c->response->content_length(length($xls)); > > > > Yes, I was doing the encode then using Length (I did read on perldocs > about requesting the length against the octet) , either way, the length was > the least of my worries, keeping Catalyst from falling over with ‘Wide > Character’ errors, or not getting garbage was my main concern. > > > > And yes, the output is CSV not strictly XLS but I have been told and > looked it up on the net that 'application/vnd.ms-excel' Is the correct > MIME header to pass for CSV that you want MS Excel to open. > http://www.ietf.org/rfc/rfc4180.txt, but how Windows decides how to open files is something I'm not familiar with. -- Bill Moseley [email protected]
_______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
