use Win32::OLE; # use existing instance if Excel is already running my $excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Application', 'Quit'); my $workbook = $excel->Workbooks->Open("c:\\your_file.xls"); my $worksheet = $workbook->Worksheets(1); for my $row(0..$maxRow) { for my $col(0..$maxCol) { my $cell = $workbook->{Cells}[$row][$col]; $cell->{Value} = '#Failure' unless($cell->{Value}); } } # save and exit $workbook->Close();