====================================================================== NAME Spreadsheet::WriteExcel - Write formatted text and numbers to a cross-platform Excel binary file. ====================================================================== DESCRIPTION The Spreadsheet::WriteExcel module can be used to create a cross- platform Excel binary file. Multiple worksheets can be added to a workbook and formatting can be applied to cells. Text, numbers, formulas and hyperlinks can be written to the cells. The Excel file produced by this module is compatible with Excel 5, 95, 97 and 2000. The module will work on the majority of Windows, UNIX and Macintosh platforms. Generated files are also compatible with the Linux/UNIX spreadsheet applications OpenOffice, Gnumeric and XESS. The generated files are not compatible with MS Access. This module cannot be used to read an Excel file. See Spreadsheet::ParseExcel or look at the main documentation for some suggestions. This module cannot be uses to write to an existing Excel file. ====================================================================== SYNOPSIS To write a string, a formatted string, a number and a formula to the first worksheet in an Excel workbook called perl.xls: use Spreadsheet::WriteExcel; # Create a new Excel workbook my $workbook = Spreadsheet::WriteExcel->new("perl.xls"); # Add a worksheet $worksheet = $workbook->addworksheet(); # Add and define a format $format = $workbook->addformat(); # Add a format $format->set_bold(); $format->set_color('red'); $format->set_align('center'); # Write a formatted and unformatted string, row and column notation. $col = $row = 0; $worksheet->write($row, $col, "Hi Excel!", $format); $worksheet->write(1, $col, "Hi Excel!"); # Write a number and a formula using A1 notation $worksheet->write('A3', 1.2345); $worksheet->write('A4', '=SIN(PI()/4)'); ====================================================================== REQUIREMENTS This module requires Perl 5.005 (or later) and Parse::RecDescent: http://search.cpan.org/search?dist=Parse-RecDescent ====================================================================== INSTALLATION Method 1 Download the zipped tar file from one of the following: http://search.cpan.org/search?dist=Spreadsheet-WriteExcel http://theoryx5.uwinnipeg.ca/mod_perl/cpan-search?idinfo=154 ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/J/JM/JMCNAMARA/ Unzip the module as follows or use winzip: tar -zxvf Spreadsheet-WriteExcel-0.xx.tar.gz The module can be installed using the standard Perl procedure: perl Makefile.PL make make test make install # You may need to be root make clean # or make realclean Windows users without a working "make" can get nmake from: ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe Method 2 If you have CPAN.pm configured you can install the module as follows: perl -MCPAN -e "install 'Spreadsheet::WriteExcel'" Method 3 ActivePerl users can use PPM as follows: C:\> ppm PPM> set repository tmp http://homepage.eircom.net/~jmcnamara/perl PPM> install Spreadsheet-WriteExcel PPM> quit C:\> If this fails try the following: PPM>install http://homepage.eircom.net/~jmcnamara/perl/Spreadsheet-WriteExcel.ppd If you wish to perform a local PPM install you can get the files from (xx is the version number): http://homepage.eircom.net/~jmcnamara/perl/Spreadsheet-WriteExcel.ppd http://homepage.eircom.net/~jmcnamara/perl/Spreadsheet-WriteExcel-0.xx-PPM.tar.gz ====================================================================== AUTHOR John McNamara (jmcnamara@cpan.org)