max210 has asked for the wisdom of the Perl Monks concerning the following question:

Hello,
I have two arrays and I need to plot graph of 1st array VS 2nd array elements and add that graph in an already existing excel file.
Example: @a1(2,34,5,6) VS @a2(1,3,5,3)
Plot a graph of x-axis as @a1 and y-axis as @a2 i.e. (x,y)=(2,1),(34,3),(5,5),(6,3)
I found code in perl monks to create a chart from an array which would help.
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); $xls->Charts->Add(); $xls->ActiveChart->SeriesCollection->NewSeries(); $xls->ActiveChart->SeriesCollection(1)->{Values} = "={".$series_string +_a."}"; $xls->ActiveChart->Location({ Where => xlLocationAsObject, Name =>'She +et1'});
Kindly help