On 2013-07-02 19:26, Bill Moseley wrote:

On Tue, Jul 2, 2013 at 9:29 AM, Craig Chant 
<[email protected]<mailto:[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.
That depends on the Browser setting per mime type and not the OS.
In Firefox you can define it in Preferences / Applications.



--
Bill Moseley
[email protected]<mailto:[email protected]>


_______________________________________________
List: [email protected]<mailto:[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/




*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
_______________________________________________
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/

Reply via email to