Greetings Wise Monks

I have created a simple test script for Excel::Template to experiment with formulae on one worksheet that reference cells values on another. The perl script and xml template are shown below

When I run the script I get the following error:

Can't use an undefined value as an ARRAY reference at /usr/local/share/perl/5.10.0/Excel/Template/Context.pm line 301.

The script/template work correctly when all three rows are on a single worksheet.

Are cross-worksheet references beyond the scope of this module? Any advice greatly appreciated.

perl script

#!/usr/bin/perl use strict; use warnings; use Excel::Template; my $template = new Excel::Template(); $template->parse( 'test.xml' ); $template->write_file( 'test.xls' );

xml template

<?xml version='1.0'?> <!DOCTYPE spreadsheet> <workbook> <worksheet name="Tab1"> <row> <cell ref="one" type="number" text="1" /> <cell ref="two" type="number" text="2" /> </row> </worksheet> <worksheet name="Tab2"> <row> <formula>=<backref ref="one" />+<backref ref="two" /></formula> </row> </worksheet> </workbook>

In reply to Is it possible to use back references across worksheets with Excel::Template? by normskib

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.