If you read the documentation for write_row, you'll see that it generates the same return code as write, which is:
So I believe you are incorrectly exiting with your code:0 for success. -1 for insufficient number of arguments. -2 for row or column out of bounds. -3 for string too long.
That is to say, try changing or to and in the above line, and that section of your code should work. You don't need to check the value of "$!", because it's not a system call, which may thus be giving you misleading results.$worksheet->write_row($excelRow, 0, \@personData) or die "Write failed +: $!\n";
When I ran it, after "doctoring" the @personData array to hold some valid values, I was getting the error Write Failed: Bad file descriptor, which is a red herring. When the logic was changed to interpret zero as success (and I added a line workbook->close() immediately afterwords), the Excel spreadsheet correctly contained the data I had written.
In reply to Re: Excel File Problem
by liverpole
in thread Excel File Problem
by joelnackman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |