On Mon, 21 Oct 2002, donald power wrote: > Nope, the value is there after the '=' sign, (ie $Sheet->$Range("A2:A7")->{'Text'}; >). > I simply copied it from notepad and did not displayed nicely in the email format. > <<Sigh>> wish anyone can point me to the right direction. > > > > --- Bruno FABLET <[EMAIL PROTECTED]> wrote: > >error on: "$Chart->SeriesCollection(1)->{XValues} = " > >there is no value after '=' > > > > --- donald power <[EMAIL PROTECTED]> a écrit : > Hi > >everyone, > >> > >> I've been trying to plot excel charts with 2 axes, > >> but always result in one axes or even nothing is > >> plotted. > >> Could anyone please tell me where to fix in the > >> short code below? > >> > >> thanks, > >> // donald // > >> > >> > >> > >====================================================== > >> use strict; > >> use Win32::OLE; > >> use Win32::OLE::Const 'Microsoft Excel'; > >> > >> my $Excel = Win32::OLE->new("Excel.Application"); > >> $Excel->{Visible} = 1; > >> > >> my $Book = $Excel->Workbooks->Add; > >> my $Sheet = $Book->Worksheets(1); > >> > >> my $Range = $Sheet->Range("A2:C7"); > >> $Range->{Value} = > >> [['TIME', 'QUANTITY', 'PRICE'], > >> ['10:00', 100, 15], > >> ['11:00', 150, 10], > >> ['12:00', 80, 10], > >> ['13:00', 100, 20], > >> ['14:00', 120, 15]]; > >> > >> my $Chart = $Excel->Charts->Add; > >> $Chart->{ChartType} = xlBuiltIn; > >> $Chart->{TypeName} = "Lines on 2 Axes"; > >> > >> my $Sheet = $Book->Worksheets(1); > >> $Chart->SeriesCollection(1)->{XValues} = > >> $Sheet->$Range("A2:A7")->{'Text'}; > >> $Chart->SeriesCollection(1)->{AxisGroup} = 1; > >> $Chart->SeriesCollection(1)->{Border}->{LineStyle} > >> = "xlContinuous"; > >> $Chart->SeriesCollection(1)->{Values} = > >> $Sheet->$Range("B2:B7")->{'Value'}; > >> $Chart->SeriesCollection(1)->{Name} = "QUANTITY"; > >> > >> $Chart->SeriesCollection->NewSeries; > >> $Chart->SeriesCollection(2)->Select; > >> $Chart->SeriesCollection(2)->{XValues} = > >> $Sheet->Range("A2:A7")->{'Text'}; > >> $Chart->SeriesCollection(2)->{AxisGroup} = 2; > >> $Chart->SeriesCollection(2)->{Border}->{LineStyle} > >> = "xlDash"; > >> $Chart->SeriesCollection(2)->{Values} = > >> $Sheet->Range("C2:C7")->{'Value'}; > >> $Chart->SeriesCollection(2)->{Name} = "PRICE"; > >> > >> > >======================================================
Did you indend to use for your assigned value: $Sheet->Range("A2:A7")->{'Text'} **** [EMAIL PROTECTED] <Carl Jolley> **** All opinions are my own and not necessarily those of my employer **** _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs