< ^ >

Writing Excel as a binary file


    #!/usr/bin/perl -w

    use strict;
    use Spreadsheet::WriteExcel;

    my $data =  [
                    ['Area',    'Sales'      ],
                    ['East',    '150'        ],
                    ['West',    '100'        ],
                    ['Total',   '=SUM(B2:B3)'],
                ];

    my $workbook  = Spreadsheet::WriteExcel->new("new_xls.xls");
    my $worksheet = $workbook->add_worksheet();

    $worksheet->write_col('A1', $data);

    __END__