<html>
<body>
This is probably a Linux problem, but I'm so perplexed I thought I'd ask
here. I have script that produces an Excel spreadsheet using the
"Spreadsheet-WriteExcel-2.17" package from John McNamara --
which is excellent by the way. The symptom is a corrupt output file. I
have a stripped down test script that just creates a workbook
and one worksheet, then closes it--so it is trivial and proves that the
code is ok. When I run it logged in as root, the file can be loaded into
Excel, when not run as root, it's corrupt. <br><br>
I've done all the checking I can think of: looking for duplicate modules,
checking directory and file ownership and permissions, and can't figure
out what's going on. I have access to another, shared Linux system. When
I copied the code to the second machine, script creates a good file even
though I'm running from a non-root account on that machine.<br>
This is most likely a Linux problem, but could anyone suggest any
debugging techniques I could use besides -W and -T? Believe it or not
I've been looking at this code for over 14 hours.<br><br>
For what it's worth, here's my script.<br>
<font face="Courier, Courier">#!/usr/bin/perl -w<br>
use strict;<br>
use Spreadsheet::WriteExcel;<br>
my $workbook =
Spreadsheet::WriteExcel->new("perl.xls");<br>
if (defined($workbook)) { print "workbook
defined\n"; } else { print "workbook error\n"; }<br>
my $sheet1 = $workbook->add_worksheet("First
sheet");<br>
if (defined($sheet1)) { print "sheet1
defined\n"; } else { print "sheet1 not defined\n"; }<br>
$workbook->close();<br>
exit;<br>
</font></body>
</html>