Cannot I just check for the mime-types supported by the browser (by checking
ENV{HTTP_ACCEPT}) and conditionally set the content type to
application/msexcel? Incidently, I discovered that this mime type works and
excel automatically converts the HTML to excel tables.

What is confusing me, however, is that when I enumerate the environment
variables, I see application/vnd.ms-excel (which does not work) and not
application/msexcel (which does work).

Thanks,
Siegfried


>-----Original Message-----
>From: David Dorward,,, [mailto:[EMAIL PROTECTED] On Behalf Of David Dorward
>Sent: Friday, May 13, 2005 2:17 PM
>To: beginners-cgi@perl.org
>Subject: Re: How to use mime types for excel?
>
>On Fri, May 13, 2005 at 02:06:42PM -0600, Siegfried Heintze wrote:
>> I saw a very simple demonstration last night (at the Boulder Java users
>> group) where Scott Davis showed a very simple java server pages program
that
>> transmitted HTML table data to a browser resident instance of Microsoft
>> Excel. IE automatically looked at the mime types and invoked MS Excell to
>> convert the HTML to a spreadsheet.
>
>Don't do that. You've no idea what software the end user will be
>using, so if you lie and claim that an HTML document is really an
>Excel document then you can cause problems for people.
>
>If you want to generate Excel, then Perl has many fine modules to do
>just that.
>
>(At a wild guess I'd say that perhaps you were encountering the IE
>knows the Content-Type better then the server issue, and it was
>realising that you Excel document was really an HTML document and
>doing The "Right" Thing).
> 
>-- 
>David Dorward                                      http://dorward.me.uk
>
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to