Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Here is the code I was trying to work on...but it gets created on 1 cell when I try to open it in a excel spread sheet
# start an XML worksheet open (my $xmlfl,"+>>$path/$file") or die "$file failed: $!\n" +; print $xmlfl "<?xml version=\"1.0\"?>\n"; print $xmlfl "<Workbook xmlns=\"urn:schemas-microsoft-com:offi +ce:spreadsheet\"\n"; print $xmlfl " xmlns:o=\"urn:schemas-microsoft-com:office:offi +ce\"\n"; print $xmlfl " xmlns:x=\"urn:schemas-microsoft-com:office:exce +l\"\n"; print $xmlfl " xmlns:ss=\"urn:schemas-microsoft-com:office:spr +eadsheet\">\n"; print $xmlfl " <Worksheet ss:Name=\"Policy-Groups\">\n"; print $xmlfl " <Table>\n"; # print $xmlfl the header row # <group> <policy1> <policy2> ... <policyn> print $xmlfl " \n<Row>"; foreach $app(keys %appsrvr) { print $xmlfl " <Cell><Data ss:Type=\"String\">$app< +/Data></Cell>"; print $xmlfl " </Row>"; print $xmlfl " <Row>\n"; foreach $attribute(keys %{ $appsrvr{$app} }) { #print " $appsrvr{$app}{$attribute}"; print $xmlfl " <Row>\n"; print $xmlfl " <Cell><Data ss:Type=\"String\">$appsrvr{$app +}{$attribute}</Data></Cell>\n"; print $xmlfl " </Row>\n"; } # print $xmlfl " </Row>\n" } # print "\n"; # End the XML worksheet print $xmlfl " </Table>\n"; print $xmlfl " </Worksheet>\n"; print $xmlfl "</Workbook>\n"; # close this group file

CodeTags™ by holli


In reply to Re^3: PERL AND XML by Anonymous Monk
in thread PERL AND XML by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found