Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
This module allows for the creation of Excel binary files. Robust cell formatting, cell merges, multiple worksheets, formulae, printer specifications, The author has well documented this work, providing working examples that illustrate many of its features.

Why should you?
If you display a lot of data, and wish to allow users to export it in a readily usable format, this is the way to go.

Why Not?
Have never benchmarked it, but it does a lot of work, which takes a bit of time -- About 5 secs or so to create a a 2-worksheet spreadsheet about 15K. This is still under development, and does not currently support Macros. Requires 5.6.0, support for IEEE 64 bit float, Text:: and Parse:: packages.

How

This is from the examples that come with the distro:
#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; # Create a new workbook called simple.xls and add # a worksheet my $workbook = Spreadsheet::WriteExcel->new("simple.xls"); my $worksheet = $workbook->addworksheet(); # The general syntax is write($row, $column, $token). Note that row an +d # column are zero indexed # Write some text $worksheet->write(0, 0, "Hi Excel!"); # Write some numbers $worksheet->write(2, 0, 3); # Writes 3 $worksheet->write(3, 0, 3.00000); # Writes 3 $worksheet->write(4, 0, 3.00001); # Writes 3.00001 $worksheet->write(5, 0, 3.14159); # TeX revision no.? # Write some formulas $worksheet->write(7, 0, '=A3 + A6'); $worksheet->write(8, 0, '=IF(A5>3,"Yes", "No")'); # Wrte a hyperlink $worksheet->write(10, 0, 'http://www.perl.com/');

Edit Masem 2002-01-23 - Added CODE tags

Edit abaxaba 2003-12-23 - Corrected Type - thanks ff


In reply to Spreadsheet::WriteExcel by abaxaba

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 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? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2021-12-01 01:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?