Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Win32::OLE chart Generation problem Excel 2007

Win32::OLE chart Generation problem Excel 2007

Win32::OLE chart Generation problem Excel 2007

Hello All,
I am running following simple script on perl64 to generate chart on excel but I am getting following errors
Win32::OLE(0.1709) error 0x80020003: "Member not found"
in PROPERTYPUT "ChartType" at C:\path\test.pl line 20.

Here is my system speC

PERL version : Perl 64 v5.16.3
WIN32 OLE : 0.1709
Excel Version : Excel 2007 SP3

Can anyone please give me some input on how I can remove this error and generate chart ?

Thank you,
======================Script Start =======================
use strict;
use Win32::OLE;
use Win32::OLE::Const 'Microsoft Excel';

my $Excel = Win32::OLE->new("Excel.Application");
$Excel->{Visible} = 1;
$Win32::OLE::Warn = 3;
my $Book = $Excel->Workbooks->Add;
my $Sheet = $Book->Worksheets(1);
my $Range = $Sheet->Range("A2:C7");
$Range->{Value} =
[['Delivered', 'En route', 'To be shipped'],
[504, 102, 86],
[670, 150, 174],
[891, 261, 201],
[1274, 471, 321],
[1563, 536, 241]];

my $Chart = $Excel->Charts->Add;
$Chart->{ChartType} = xlAreaStacked;
$Chart->SetSourceData({Source => $Range, PlotBy => xlColumns});
$Chart->{HasTitle} = 1;
#$Chart->ChartTitle->{Text} = "Items delivered, en route and to be shipped";

RE: Win32::OLE chart Generation problem Excel 2007

Where is xlAreaStacked coming from?


$Chart->{ChartType} = xlAreaStacked; 

Looking at this table something like the following may work:


$Chart->{ChartType} = 76; 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close