OLE exception from "Microsoft Office Excel":
'./test.xls' could not be found. Check the spelling of the file name, and
verify that the file location is correct.
If you are trying to open the file from your list of most recently used
files, make sure that the file has not been renamed, moved, or deleted.
Win32::OLE(0.1709) error 0x800a03ec
in METHOD/PROPERTYGET "Open" at C:/workspace/graph.pl line 12
####
use strict;
use warnings;
use 5.010;
#use Spreadsheet::WriteExcel;
use Win32::OLE qw(in with);
use Win32::OLE::Const 'Microsoft Excel';
$Win32::OLE::Warn=3;
my $Excel=Win32::OLE->GetActiveObject('Excel.Application')||
Win32::OLE->new('Excel.Application', 'Quit');
my $book=$Excel->Workbooks->Open("./test.xls");
my $sheet=$book->Worksheets(1);
####
use strict;
use warnings;
use 5.010;
use Spreadsheet::WriteExcel;
$filename="".$currSite.".xls";
$workbook = Spreadsheet::WriteExcel->new($filename);
$worksheet = $workbook->add_worksheet();
while(<$file>){
$worksheet->write($row,0,$year);
$worksheet->write($row,1,$count);
$row++;
}
$workbook->close();