GD is available for v5.6.1 from ActiveState, see session transcript
below for perl -v and PPM.  GD and GD::Graph will both be necessary.  I
use it for rendering *.png files which should be able to be identified
and rendered by IE.  A very simple and sloppy example of use is also
included following the session transcript.

If your heart is set on using Excel for rendering the graph then
Win32::OLE will probably be your best bet.


#---Begin session transcript---

C:\>perl -v

This is perl, v5.6.1 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2001, Larry Wall

Binary build 629 provided by ActiveState Tool Corp.
http://www.ActiveState.com
Built 12:27:04 Aug 20 2001


Perl may be copied only under the terms of either the Artistic License
or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'.  If you have access to
the
Internet, point your browser at http://www.perl.com/, the Perl Home
Page.


C:\>ppm
PPM interactive shell (2.1.5) - type 'help' for available commands.
PPM> search GD
Packages available from
http://ppm.ActiveState.com/cgibin/PPM/ppmserver.pl?urn:/PPMServer:

GD                 [1.27.2] Interface to Gd Graphics Library
GD-Barcode         [1.13  ] Create barcode image with GD
GDGraph            [1.33  ] Graph Plotting Module for Perl 5
GDGraph-Map        [1.05  ] generate HTML map text for GD::Graph
diagramms.
GDGraph3d          [0.55  ] Create 3D Graphs with GD and GD::Graph
GDS2               [1.2   ]
GDTextUtil         [0.80  ] text utilities for GD
Image-GD-Thumbnail [0.02  ] produce thumbnail images with GD
PPM>

#---End session transcript---

#---Begin code example---

#!c:\perl\bin -w

use GD::Graph::linespoints;

$graphic = GD::Graph::linespoints->new();
$graphic->set('title'        => 'Kirk Test',
              'label'        => 'Label',
              'axislabelclr' => 'black');
@data=(["29-Nov-01","30-Nov-01","1-Dec-01","2-Dec-01","3-Dec-01"],
       [737.67,772.55,778.55,782.55,792.55]);

my $gd = $graphic->plot(\@data);

open(IMG, '>mkd.png') or die $!;
binmode IMG;
print IMG $gd->png;

#---End code example---

-----Original Message-----
From: Hewlett Pickens [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 5:54 PM
To: zPerl Beginners
Subject: Invoke MS EXCELL From Perl


Is there a way to invoke Microsoft EXCELL from Perl?

Environment:

  Using IE on Windows 98, have invoked a CGI script on Linux/390 which
sends
a comma separated variable (CSV) file back to IE, and the Perl script
there
files it on the PC's hard drive.

  Want to do some line/bar/pie graphics on the PC.

  The GD module isn't available on the Windows version of Perl we have
from
Active State: v5.6.1

  So, would like to invoke EXCELL to do some graphs and bar charts along
lines of

     start excell using abcd.xls

  "abcd.xls" would have a Visual Basic for Applications (VBA) script to
go
after and massage the CSV.

Thanks,

Hew

Hewlett M. Pickens



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to