in reply to Excel::Template final XML file

Doesn't Excel::Template simply use an XML file as the template input? What's preventing you from accessing this in the normal way? John McNamara has produced a lot of tools over the years for making working with Excel in a perlish way simple, for example Excel::Writer::XLSX.

Replies are listed 'Best First'.
Re^2: Excel::Template final XML file
by llarochelle (Beadle) on Dec 05, 2018 at 16:15 UTC
    Hi marto, you're absolutely right. But since the template contains loop instructions, I'd like to be able to give the user a preview with some sample data. My objective is to use the XML of a sample template to display in a webpage. My actual XML template is not intelligible.

    Edit : I forgot to mention, I'm using the wrapper Excel::Template::TT

    <workbook> <worksheet name="Configuration"><format color="black"> <row><bold><cell text="!!!!!!!!! [% host.cmts.name %] !!!!!!!!!!" +/></bold></row> <row /> [% FOREACH int IN host.interfaces %] <row><cell text="interface ip-bundle [% int.bundle %].[% int.subBu +ndle %]" /></row> [%- FOREACH ip IN int.secondaries %] <row><cell text=" ip address [% ip.ipAddress %] [% ip.subnetMask % +] secondary" /></row> [%- END %] [% END %] <row /> <row><bold><cell text="!!!!!!!!! END : [% host.cmts.name %] !!!!!! +!!!!" /></bold></row> </format> </worksheet> </workbook>