in reply to Excel::Template final XML file
Looking at the source, you should be able to access the tempfile name using $template->{tempfile}
poj#!/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')
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Excel::Template final XML file
by llarochelle (Beadle) on Dec 05, 2018 at 18:20 UTC |