Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Generate chart in Excel

by Ponky (Curate)
on May 04, 2006 at 23:46 UTC ( #547544=note: print w/ replies, xml ) Need Help??


in reply to Generate chart in Excel

It is actually possible:

use strict; use warnings; use Win32::OLE; use Win32::OLE::Const "Microsoft Excel"; my $xls = Win32::OLE->new('Excel.Application'); $xls->Workbooks->Add(); $xls->{Visible} = 1; my @series_a = (1,2,3,4,5,6); my $series_string_a = join(',',@series_a); my @series_b = (6,5,4,3,2,1); my $series_string_b = join(',',@series_b); $xls->Charts->Add(); $xls->ActiveChart->SeriesCollection->NewSeries(); $xls->ActiveChart->SeriesCollection(1)->{Values} = "={".$series_string +_a."}"; $xls->ActiveChart->SeriesCollection->NewSeries(); $xls->ActiveChart->SeriesCollection(2)->{Values} = "={".$series_string +_b."}"; $xls->ActiveChart->Location({ Where => xlLocationAsObject, Name =>'She +et1'});


Comment on Re: Generate chart in Excel
Download Code
Re^2: Generate chart in Excel
by Anonymous Monk on May 05, 2006 at 14:55 UTC

    Ponky, thats an excellent reply :-). I saw that you are writing a writeup after one year. Thank you very much. I thought that it is not possible after seeing the above replies, but atlast i got an wonderful reply which i didnt expected. Thats Perl Monks:)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (12)
As of 2014-08-27 20:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (252 votes), past polls