Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: How to display the Excel::Writer::XLSX chart image to the web browser with CGI?

by theravadamonk (Scribe)
on Aug 03, 2018 at 11:49 UTC ( [id://1219807]=note: print w/replies, xml ) Need Help??


in reply to Re: How to display the Excel::Writer::XLSX chart image to the web browser with CGI?
in thread How to display the Excel::Writer::XLSX chart image to the web browser with CGI?

Thanks for your quick response.

>>If you are you trying to open the Excel document via a browser https://fastapi.metacpan.org/source/JMCNAMARA/Excel-Writer-XLSX-0.98/examples/cgi.pl should work

It works. It will be downloaded. I can open it.

The code I hv given prints a NICE doughnut chart inside excel file. I ONLY need it to display via web browser. I don't need to download the whole excel file

When I use gd:graph, it can be done with below code

print "Content-type: image/png\n\n"; binmode STDOUT; print $myimage->png;

How can I achieve it with Excel::Writer::XLSX ?

>> you don't say which OS you are running.

OS is Linux (CentOS 6.9 64 bit) without GUI. Server is Somewhere else, while I write from somewhere REMOTELY.. My Pc is Ubuntu with GUI

  • Comment on Re^2: How to display the Excel::Writer::XLSX chart image to the web browser with CGI?
  • Download Code

Replies are listed 'Best First'.
Re^3: How to display the Excel::Writer::XLSX chart image to the web browser with CGI?
by marto (Cardinal) on Aug 03, 2018 at 12:46 UTC

    "How can I achieve it with Excel::Writer::XLSX ?"

    As I said, I don't think you can do this. This module writes a file, think of it as an XML file in a zip container. It's the application that actually draws the charts. You're not using the Excel application with this module.

    Update: On Linux you should be able to open the file in OpenOffice, and extract the rendered chart, in a similar fashion to the Win32::OLE route. Take a look at OpenOffice::UNO. If you have a working solution via GD couldn't you just use that method?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1219807]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-04-24 09:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found