Item Description: Create MS_Excel binaries
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.
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.
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