Hello Team, I have been trying to show the Column chart by linking one sheet on the same file but I was unable to add 2 columns categories under single legend. I need your help to fix this issue. Please check my Code snippet below

$workbook1 = Excel::Writer::XLSX->new($strExcelFilename); #$worksheet1 = $workbook1->addworksheet("DEVICE-BROWSER-LIST") +; $worksheet1 = $workbook1->add_worksheet('Data'); $worksheet2 = $workbook1->add_worksheet('Summary'); $row1= 1; foreach $worksheet1 ($workbook1->sheets()) { if( $worksheet1->get_name() eq $SUCCESS_COUNT_SHEET_NAME ) { $format = $workbook1->add_format(%header); $worksheet1->write(0,0, "User Id", $format); $worksheet1->write(0,1, "User Display Name", $format); $worksheet1->write(0,2, "User Email Id", $format); $worksheet1->write(0,3, "Device", $format); $worksheet1->write(0,4, "Browser", $format); $worksheet1->write(0,5,"Application Name", $format); $worksheet1->write(0,6,"TimeStamp", $format); #$worksheet1->write(0,7, "EMAIL--ITUSER-STATUS", $format); for ($k = 0; $k <= $#responseid; $k++) { $worksheet1->write($row1,0, $responseid[$k]); $worksheet1->write($row1,1, $responsdisp[$k]); $worksheet1->write($row1,2, $responsalter[$k]); $worksheet1->write($row1,3, $responseclientdevice[$k]); $worksheet1->write($row1,4, $responseclientbrowser[$k]); $worksheet1->write($row1,5, $responseapps5[$k]); $worksheet1->write($row1,6, $estdate[$k]); $row1++; } } $chart1 = $workbook1->add_chart( type => 'column', embedded => 1 + ); $chart1->add_series( categories => '='. "Data" . '!$E$2:$E$1200', name => '='."Data".'!$F$1', values => '='."Data".'!$F$2:$F$1200', ); $chart1->add_series( categories => '='. "Data" . '!$D$2:$E$1200', values => '='."Data".'!$D$2:$D$1200', ); $chart1->set_title ( name => 'Results of sample analysis +' ); $chart1->set_x_axis( name => 'Computer' ); $chart1->set_y_axis( name => 'Browser' ); $chart1->set_style( 11 ); $worksheet2->insert_chart( 'E2', $chart1, 25, 10 ); } $workbook1->close();

In reply to Unable to create a Pivot chart with visiable Columns by chandantul

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.