John:
> I am trying to generate a web page with :
> print $q->header("application/vnd.ms-excel"),
> 
> This tries to launch Excel but I get the error:
> "File cannot be opened because: A declaration was not closed Line 1, 
> Position 1 <"
> 
> When I use:
> print $q->header("text/html"),
> 
> The page displays correctly and I do not see any "open" or "unclosed" 
> HTML...

Wiggins:
>If you print an excel header then you have to print excel formatted
output, not HTML.  There is no
>automatic conversion on either side of the connection (at least without
a pretty nice plugin that
>I don't think has been written yet).  There is a chance you could print
an excel header and then 
>output comma delimited data but I would be surprised if excel is that
smart.
>What are you really trying to do?

John:
>What I'm trying to do is make my new boss happy! They like everything
in Excel.
>I have a BUNCH of CGI scripts on a SUN Unix generating tons of very
nice HTML pages from data in 
>an Oracle database.... I "need" to alternately be able to generate the
same pages in an Excel 
>spreadsheet...
>Any thoughts would be greatly appreciated...

Me:
Our system has a page that displays a form to enter a course number and
get the class list.  One of the things on the form is a checkbox that
says "Excel Format".  If the user checks this box, instead of printing
HTML, the script generates your "application/vnd.ms-excel" then just
starts printing data with tabs between the fields.
Excel opens in the browser and displays the data as a spreadsheet which
the user can save to their own hard drive if they so choose.
HTH,
Chris.
>>-----> <-----<<
Chris Mortimore
Information Services
Graceland University
mailto:[EMAIL PROTECTED]


--
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