Hello Monks,
I have a perl application which was working fine in MS Excel 2003. We got upgraded to Office 2007 and the application stopped working. On troubleshooting I have narrowed it down to "ApplyDataLabel" when its trying to create a chart. the code lines are ....
my $book = $excel->workbooks->add;
my $sheet = $book->worksheets(1);
.
.
.
my $Chart = $excel->Charts->Add;
$chart->{ChartType} = xlColumnClustered;
$Chart->{DepthPercent} = 100 || win32_error("DepthPercent");
$Chart->{HasLegend} =0 || win32_error("HasLegend");
$Chart->SetSourceData({Source=>$Range, PlotBy =>xlColumns});
$Chart->SeriesCollection(1)->ApplyDataLabels->{AutoText}=1;
$Chart->SeriesCollection(1)->ApplyDataLabels->{ShowValue}=1;
The code works fine in Excel 2003 but dies in 2007 at the line:
$Chart->SeriesCollection(1)->ApplyDataLabels->{AutoText}=1;
complaining that cannot set hash reference with null values ???
On Commenting this the code processes through and finishes running. The charts are drawn , just that they are missing some borders.
It appears that something changes in Excel 2007 from 2003 which has broken the method "ApplyDataLabels".
IS anybody aware of any such changes ??
Thank You,
regards,