OLE exception from "Microsoft Office Excel":
Unable to set the HasTitle property of the Chart class
Win32::OLE(0.1707) error 0x80020009: "Exception occurred"
in PROPERTYPUT "HasTitle" at Processor.pl line 1044
####
$mcr_crtime_chart->{HasTitle} = 1;
$mcr_crtime_chart->ChartTitle->{Text} = "MCRByURN-CreateTime";
####
OLE exception from "Microsoft Office Excel":
Unable to set the Position property of the Legend class
Win32::OLE(0.1707) error 0x80020009: "Exception occurred"
in PROPERTYPUT "Position" at Processor.pl line 1043
####
$mcr_crtime_chart->{HasLegend} = 1;
$mcr_crtime_chart->Legend->{Position} = xlRight;
####
OLE exception from "Microsoft Office Excel":
Unable to set the Name property of the Series class
Win32::OLE(0.1707) error 0x80020009: "Exception occurred"
in PROPERTYPUT "Name" at Processor.pl line 1056
####
use OLE;
use Win32::OLE qw(in with);
use Win32::OLE::Const "Microsoft Excel";
use Win32::OLE::Variant;
use Win32::OLE::NLS qw(:LOCALE :DATE);
$Excel = Win32::OLE->GetActiveObject('Excel.Application')||Win32::OLE->new('Excel.Application','Quit');
$Excel->{DisplayAlerts}=0;
$Excel->{SheetsInNewWorkbook} = 16;
$Book = $Excel->Workbooks->Add;
$mcr_crtime_chart = $Excel->Charts->Add({After => $mcrsa_crtab_sheet});
$mcr_crtime_chart->{Name} = "CreateTime_Graph";
$mcr_crtime_chart->{ChartType} = xlXYScatterLines;
$mcr_crtime_chart->{HasLegend} = 1;
# $mcr_crtime_chart->Legend->{Position} = xlRight;
# $mcr_crtime_chart->{HasTitle} = 1;
# $mcr_crtime_chart->ChartTitle->{Text} = "MCRByURN-CreateTime";
$x_range = $mcrsa_crtab_sheet->Range("B2:B69");
$mcr_crtime_chart->SetSourceData($mcrsa_crtab_sheet->Range("A2:D69"),xlColumns);
$mcr_crtime_chart->SeriesCollection->LetProperty('XValues',$x_range);
for ($p = 2; $p < $ct_max_column; $p++) {
$y_range[$p] = $mcrsa_crtab_sheet->Range("$LetterByNumber{$p}2:$LetterByNumber{$p}$ct_row");
$mcr_crtime_chart->SeriesCollection($p)->LetProperty('YValues',$y_range[$p]);
$mcr_crtime_chart->SeriesCollection($p)->{Name} = "Series $p";
}
my $Xaxes = $mcr_crtime_chart->Axes(xlCategory,xlPrimary);
$Xaxes->{HasTitle} = 1;
$Xaxes->{AxisTitle}->{Characters}->{Text} = "Create Time (sec)";
my $Yaxes = $mcr_crtime_chart->Axes(xlValue,xlPrimary);
$Yaxes->{HasTitle} = 1;
$Yaxes->{AxisTitle}->{Characters}->{Text} = "MCR (%)";