woland99 has asked for the wisdom of the Perl Monks concerning the following question:
I just migrated to MS Office 2013 and I have problem with adding comments to Excel spreadsheet via Perl script.
My old code looked a bit like:
and it worked fine in Office 2003 but on Office 2013 I get: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"; } }
Line 2834 is where AddComment is being called. This is confusing since I recorded the macro when adding comment and I get VB code virtually identical to the code on which I based that Office 2003 implementation. TIA for any pointers/info.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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Win32::OLE AddComment method and MS Office 2013
by poj (Abbot) on Nov 10, 2014 at 13:30 UTC | |
|
Re: Win32::OLE AddComment method and MS Office 2013
by Anonymous Monk on Nov 10, 2014 at 09:00 UTC | |
by woland99 (Beadle) on Nov 10, 2014 at 16:50 UTC | |
by Anonymous Monk on Nov 11, 2014 at 00:09 UTC | |
by woland99 (Beadle) on Nov 11, 2014 at 23:54 UTC |