in reply to writing with WriteExcel in OO style

When you encapsulate Spreadsheet::WriteExcel objects or sub-objects like this you have to explicitly call the workbook close() method to ensure that the sub-objects are destroyed in the correct order. This is due to what I believe is a bug in DESTROY.

Also, the functionality that you are implementing via your writerow() method is already available through the Spreadsheet::WriteExcel write_row() or write() methods if you have version 0.34 or later. ;-)

@array = ('awk', 'gawk', 'mawk'); $array_ref = \@array; $worksheet->write_row(0, 0, $array_ref); # The above example is equivalent to: $worksheet->write(0, 0, $array[0]); $worksheet->write(0, 1, $array[1]); $worksheet->write(0, 2, $array[2]);