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

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'});

Replies are listed 'Best First'.
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?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2021-04-22 21:16 GMT
Find Nodes?
    Voting Booth?

    No recent polls found