in reply to Excel::Template final XML file

I've looked into the methods and could't find out.

Looking at the source, you should be able to access the tempfile name using $template->{tempfile}

#!/usr/bin/perl use strict; use Excel::Template::TT; # some TT options my $config = { INTERPOLATE => 1, EVAL_PERL => 1, }; # set variables for replacement my $vars = { host => { cmts => { name => 'name' }, interfaces => [ { bundle => 'bundle1', subBundle => 'subBundle1', secondaries => [ { ipAddress => '198.168.0.1', subnetMask => '255.255.255.0', },],},],}, }; # create object my $template = Excel::Template::TT->new( filename => 'sample.xml', config => $config, VARS => $vars, ); # xml template file created my $xml = $template->{tempfile}; open IN,'<',$xml or die "$!"; print $_ for <IN>; close IN; $template->write_file('sample.xls'); system('excel sample.xls')
poj

Replies are listed 'Best First'.
Re^2: Excel::Template final XML file
by llarochelle (Beadle) on Dec 05, 2018 at 18:20 UTC
    Hi poj, well I looked into the documentation ... I have to develop this reflex and look into the source code !

    This is great news, I tried that piece of code and it's working out perfectly

    Many thanks