<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
&quot;Spreadsheet-WriteExcel-2.17&quot; package from John McNamara --
which is excellent by the way. The symptom is a corrupt output file. I
have a stripped down test script&nbsp; that just creates&nbsp; 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>
&nbsp;&nbsp;&nbsp; use strict;<br>
&nbsp;&nbsp;&nbsp; use Spreadsheet::WriteExcel;<br>
&nbsp;&nbsp;&nbsp; my $workbook =
Spreadsheet::WriteExcel-&gt;new(&quot;perl.xls&quot;);<br>
&nbsp;&nbsp;&nbsp; if (defined($workbook)) { print &quot;workbook
defined\n&quot;; } else { print &quot;workbook error\n&quot;; }<br>
&nbsp;&nbsp;&nbsp; my $sheet1 = $workbook-&gt;add_worksheet(&quot;First
sheet&quot;);<br>
&nbsp;&nbsp;&nbsp; if (defined($sheet1)) { print &quot;sheet1
defined\n&quot;; } else { print &quot;sheet1 not defined\n&quot;; }<br>
&nbsp;&nbsp;&nbsp; $workbook-&gt;close();<br>
&nbsp;&nbsp;&nbsp; exit;<br>
</font></body>
</html>