Ah, nice catch, perhaps
$mcr_crtime_chart->ChartTitle->{Text} = "MCRByURN-CreateTime";
Should be:
$mcr_crtime_chart->ChartTitle->{Characters}->{Text} = "MCRByURN-CreateTime";
Sometimes if find it difficult to find things via the msdn search, and I have never been a huge fan of the Microsoft documentation.
It may also be worth checking out the URLs I link to in this node.
Martin
| [reply] [d/l] [select] |
If you notice the code I place the $mcr_crtime_chart->{HasLegend} = 1; and the as well $mcr_crtime_chart->{HasTitle} = 1;
but neither seem to work when I uncomment those lines of code and if I try to name the chart $mcr_crtime_chart->ChartTitle->{Text} = "CreateTime"; it fails.
I tried the XlLegendPosition Enumeration and it doesn't seem to work either. | [reply] [d/l] [select] |
are the errors produced by these changes any different to the ones in your first post in this thread?
I would suggest getting a basic script up and running that simply generates a chart, then add the features you want, as I said you should double check the Microsoft Documentation, to makes sure you are calling things properly.
Another alternative, and I don't like to mention it, but.., it may be feasable to create an excel macro to do what you want, then simply call it from perl. See Re: Running an excel macro from Perl for further details.
If I had access to a Windows machine, I would try as I suggested, take it back to basics, create a stand alone script to simply open Excel then create a basic chart, then start adding chart features/properties until I had what you are looking for, then integrate the working example into your main script.
Martin
| [reply] |
Thank you for that suggestion. The problem is I had a previous post about a problem I had creating the graphs in excel. Turns out that problem was a simple fix of missing a ">" but had the graphs created as I wanted after the fix.
I then had to make some changes to the script but basically took the code I had working and am using it. The code I currently have will create a gragh it just doesn't have a title and each of the data series doesn't have a name so when the label is printed by default it has Series1, Series2, etc which is useless for my purpose. Its frustrating because I had this exact code generating graphs but now it fails.
I will continue to look into the MS documentation to see if there is some syntax I am missing. Thanks for the suggestions. Any others are more than welcomed!
Roy
| [reply] |