1====================================================================== 2NAME 3 4 Spreadsheet::WriteExcel - Write formatted text and numbers to a 5 cross-platform Excel binary file. 6 7====================================================================== 8DESCRIPTION 9 10 The Spreadsheet::WriteExcel module can be used to create a cross- 11 platform Excel binary file. Multiple worksheets can be added to a 12 workbook and formatting can be applied to cells. Text, numbers, 13 formulas, hyperlinks and images can be written to the cells. 14 15 TThe Excel file produced by this module is compatible with 97, 16 2000, 2002 and 2003. 17 18 The module will work on the majority of Windows, UNIX and 19 Macintosh platforms. Generated files are also compatible with the 20 spreadsheet applications Gnumeric and OpenOffice.org. 21 22 This module cannot be used to read an Excel file. See 23 Spreadsheet::ParseExcel or look at the main documentation for some 24 suggestions. This module cannot be uses to write to an existing 25 Excel file. 26 27====================================================================== 28SYNOPSIS 29 30 To write a string, a formatted string, a number and a formula to 31 the first worksheet in an Excel workbook called perl.xls: 32 33 use Spreadsheet::WriteExcel; 34 35 # Create a new Excel workbook 36 my $workbook = Spreadsheet::WriteExcel->new("perl.xls"); 37 38 # Add a worksheet 39 $worksheet = $workbook->add_worksheet(); 40 41 # Add and define a format 42 $format = $workbook->add_format(); # Add a format 43 $format->set_bold(); 44 $format->set_color('red'); 45 $format->set_align('center'); 46 47 # Write a formatted and unformatted string. 48 $col = $row = 0; 49 $worksheet->write($row, $col, "Hi Excel!", $format); 50 $worksheet->write(1, $col, "Hi Excel!"); 51 52 # Write a number and a formula using A1 notation 53 $worksheet->write('A3', 1.2345); 54 $worksheet->write('A4', '=SIN(PI()/4)'); 55 56====================================================================== 57REQUIREMENTS 58 59 This module requires Perl 5.005 (or later), Parse::RecDescent 60 and File::Temp: 61 62 http://search.cpan.org/search?dist=Parse-RecDescent/ 63 http://search.cpan.org/search?dist=File-Temp/ 64 65====================================================================== 66INSTALLATION 67 68 See the INSTALL file for details. 69 70 71====================================================================== 72AUTHOR 73 74 John McNamara (jmcnamara@cpan.org) 75 76