Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Excel::Template final XML file

by marto (Cardinal)
on Dec 05, 2018 at 15:42 UTC ( [id://1226771]=note: print w/replies, xml ) Need Help??


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>

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1226771]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-20 04:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found