I have two chunks of code which will not work and I don't understand why. After creating a new workbook and addin a new sheet, I try to deactivate the gridlines, but no error message comes and the gridlines are still there:
my $newworksheet = $activeWorkbook->Worksheets->Add({Before=>$activeWo +rkbook->Worksheets(1)}) or die $!; $newworksheet -> {Name} = "Chart$Tester"; #the sheet is created -> switch off the gridlines $newworksheet -> DisplayGridlines = 'False';
the next problem is, i made a chart, via Win32::OLE (finaly I made it *g*) then I tryed to switch on the values (normaly select the column -> right click -> "Format Data Series..." -> "Data Labels" -> Checkbox "Value" on. I recorded a macro to make this via perl, but here also, no error message, but the values are noot displayed.
my $Chart = $ChartSheet->ChartObjects->Add(@Position)->Chart; $Chart->{ChartType} = xlColumnClustered; $Chart->SetSourceData({Source =>$Source, PlotBy => xlColumns}); $Chart->{HasTitle} = 1; $Chart->ChartTitle->{Text} = "$Title"; $Chart->Axes(xlCategory, xlPrimary)->{HasTitle} = 1; $Chart->Axes(xlCategory, xlPrimary)->AxisTitle->{Text} = "Groups"; $Chart->Axes(xlValue, xlPrimary)->{HasTitle} = 1; $Chart->Axes(xlValue, xlPrimary)->AxisTitle->{Text} = "Utilization (in +%)"; $Chart->Location({Where=>xlLocationAsObject, Name=>"$ChartSheet"}); #No Problem till here: $Chart->SeriesCollection(1)->ApplyDataLabels(AutoText=>'True', LegendK +ey=>'False', ShowSeriesName=>'False', ShowCategoryName=>'False', ShowValue=>'True', ShowPercentage=>'False', ShowBubbleSize=>'False');
Thanks for help... and sorry for my bad english

In reply to Problem with Excel and Win32::OLE by Streen

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.