in reply to Creating Excel File with Perl

Have you made sure that your problem is related to Spreadsheet::WriteExcel? Your (badly chosen) node title suggests that you presume the problem is with the module, but have you taken it out and sent a canned Excel file instead?

Personally, I think one of your problems is that you're sending bad HTTP headers, because you're using plain newlines (\n) where the HTTP spec wants carriage return+newline (\r\n). It's either that or the case that you're not binmodeing your output filehandle before writing binary data to it. I'd clear out both of these possibilities before looking deeper into Spreadsheet::WriteExcel.

Replies are listed 'Best First'.
Creating Excel File with Perl
by gb123z (Initiate) on Mar 12, 2009 at 19:14 UTC
    I apologize for the bad node title. I hope the updated node title is better. I didn't think there was an issue with the Spreadsheet::WriteExcel module and miscommunicated this. Instead of using the sample code I posted, I copied my original Perl code that works on the older server to the new server. Now it creates the excel report file when I call the .pl page from the browser, but saves the excel file on the server and doesn't open it on the client like it does on the older server. Would this be related to the permissions set on the new server?