LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to comp.lang.perl.misc,microsoft.public.excel.programming,comp.lang.perl.modules
external usenet poster
 
Posts: 1
Default Problem with Name of Excel Chart

Hi folks,
I have a perl script which produces a 4 worksheet Excel spreadsheet and
4 accompanying Excel Charts.
The data all looks fine but I have a problem I cannot solve.
I produce the charts via a loop in the script which loops 4 times.
For each chart, I want to name them according to the value of an array
i.e.
my @location=qw/loc1 loc2 loc3 loc4/;

However the name on each Chart is never changed, so they are labelled
Chart1, Chart2 etc.

I tried changing the $location to "TEST" but all this does is to change
Chart1 to "TEST". Charts 2,3 and 4 are not changed.

N.B. This loop is used to rename the Worksheet labels also and that
works fine.

Any help most welcome.
Thanks.
Thanks.
Paul


$Range = $Sheet-Range($cellend);

my $Chart = $Book-Charts-Add;
$Chart-{ChartType} = xlLineMarkers;
$Chart = $xl-ActiveChart;
$Chart-{Name} = 'TEST';
$Chart-SetSourceData({Source = $Range, PlotBy = xlColumns});
$Chart-{HasTitle} = 1;
$Chart-ChartTitle-{Text} = $location;
$Chart-Axes(xlCategory, xlPrimary)-{HasTitle} = 1;
$Chart-Axes(xlCategory, xlPrimary)-AxisTitle-{Text} = "Time";
$Chart-Axes(xlValue, xlPrimary)-{HasTitle} = 1;
$Chart-Axes(xlValue, xlPrimary)-AxisTitle-{Text} = "Milliseconds";

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Chart Problem!!! (Bug I think) Jose Cadeado Charts and Charting in Excel 2 November 5th 08 11:26 AM
2007 Excel Chart Problem YokohamaGaijin Excel Discussion (Misc queries) 0 June 7th 06 02:56 AM
Excel chart problem Mike1 Excel Worksheet Functions 0 September 13th 05 10:48 PM
Excel chart problem B. R.Ramachandran Excel Worksheet Functions 0 September 13th 05 10:32 PM
Excel VBA - Chart title problem OO7_neverdie Excel Programming 2 January 6th 04 11:18 PM


All times are GMT +1. The time now is 02:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"