my $comment; $comment = $wsheet->Cells($row_num,$col_num)->{Comment}; if(defined $comment) { $wsheet->Cells($row_num,$col_num)->{Comment}->Text({Text => $cell_value}); } else { $wsheet->Cells($row_num,$col_num)->AddComment($cell_value); $comment = $wsheet->Cells($row_num,$col_num)->{Comment}; if(!defined $comment) { print STDERR "Could not add comment in row $row_num and column $col_num\n"; } } #### Win32::OLE(0.1709) error 0x80010105: "The server threw an exception" in METHOD/PROPERTYGET "AddComment" at olelib.pl line 2834. Could not add comment in row 13 and column 6