Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I'm trying to add chart to my excel file, that I write with the help of Spreadsheet::WriteExcel cpan module.

No problems if cells are in consecutive range :
$add_chart->add_series( name => $window_name, categories => xl_range_formula("$test_name", 2, 2, 3, 6), values => xl_range_formula("$test_name", $row, $row, 3, + 6), );


it will add cells in $row and columns from 3 to 6 properly. But what if I have values in columns that are not consecutive ? I know you can do that in Excel (union of several cell ranges), but how can I do this in above example ?

Thanks in advance,
regards,
Bulek.
  • Comment on Can I add multiple ranges of cells with add_series in Spreadsheet::WriteExcel
  • Download Code

Replies are listed 'Best First'.
Re: Can I add multiple ranges of cells with add_series in Spreadsheet::WriteExcel
by jmcnamara (Monsignor) on Nov 26, 2010 at 11:58 UTC
    Unfortunately, that isn't possible with Spreadsheet::WriteExcel.

    --
    John.

Re: Can I add multiple ranges of cells with add_series in Spreadsheet::WriteExcel
by furry_marmot (Pilgrim) on Nov 27, 2010 at 19:18 UTC

    If you're on Win32, consider using Win32::OLE. You can send keystrokes and mouse clicks as if you were typing it yourself, and thus the full power of the program is available to you. There are examples in the documentation.

    --marmot