1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| $Chart->{ChartType} = $chart_type;
$Chart->SetSourceData({Source => $Range, PlotBy => xlColumns});
# Add a title to the chart
$Chart->{HasTitle} = 1;
$Chart->ChartTitle->{Text} = "PESQ_MOS for $chart_title";
# Add a legend to the chart
$Chart->{HasLegend} = 1;
$Chart->Legend->{Position} = xlTop;
# Set the location of the chart
$Chart->Location ({Where => xlLocationAsObject, Name => "MOS figure"});
# Save as Excel
$Book->SaveAs({Filename =>$path,
FileFormat => xlWorkbookNormal});
# Close and quit Excel
$Book->Close();
$Excel->Quit(); |
Partager