title: Can't call method "add_worksheet" on an undefined value?
body: <p>here is my cgi code , perl.xls file is present in the save folder as the script.</p>
  
  <pre><code> #!/usr/bin/perl
   print "Content-type: text/html\n\n";
   use CGI;
   use DBI;
   use Spreadsheet::WriteExcel;
   use strict;
   use warnings;
   use CGI::Carp qw(fatalsToBrowser);
   my $cgi = CGI-&gt;new;
   my $workbook = Spreadsheet::WriteExcel-&gt;new('perl.xls');
   my $worksheet = $workbook-&gt;add_worksheet();
   $worksheet-&gt;write(0,0,'value');
  </code></pre>
  
  <p>And when i run the script i get this error</p>
  
  <pre><code>Software error:
  
  Can't call method "add_worksheet" on an undefined value at /var/www/cgi-bin/excel.cgi line 17.
  
   For help, please send mail to the webmaster (root@localhost), giving this error message and the time and date of the error. 
  </code></pre>