R
Rajpreet
Greetings,
I am trying to generate an excel report using perl. However, I am
getting below error. Below is the sample file and error quote. Can any
one suggest something?
Sample Code:
#!/tools/perl/bin/perl
use Spreadsheet::WriteExcel;
my $logFile;
$logFile ="/users/rajpreet/Perl_Test07012009.xls";
#unlink($logFile);
print ("logfile is $logFile \n");
$workbook = Spreadsheet::WriteExcel->new('$logFile');
print "At the end of file \n";
Error:
Can't open $logFile. It may be in use or protected at /auto/rajpreet/
test.pl line 8
logfile is /rajpreet/Perl_Test07012009.xls
At the end of file
TIA.
I am trying to generate an excel report using perl. However, I am
getting below error. Below is the sample file and error quote. Can any
one suggest something?
Sample Code:
#!/tools/perl/bin/perl
use Spreadsheet::WriteExcel;
my $logFile;
$logFile ="/users/rajpreet/Perl_Test07012009.xls";
#unlink($logFile);
print ("logfile is $logFile \n");
$workbook = Spreadsheet::WriteExcel->new('$logFile');
print "At the end of file \n";
Error:
Can't open $logFile. It may be in use or protected at /auto/rajpreet/
test.pl line 8
logfile is /rajpreet/Perl_Test07012009.xls
At the end of file
TIA.