in reply to Win32::OLE Excel Extracting Comments
You can see Excel stuff by going into Excel, and typing alt-F11. This brings you to the VB editor, where you can press F2 to see the browser. I normally set the drop-down box to Excel (from the default value of "<All Libraries>") so I don't end up looking at Word functions.
As far as the error goes, Comment doesn't appear to be a function of a Range object (which is what $Sheet->Cells returns), Comment is a property of the range. So I'd try something like my $commentTxt = $Sheet->Cells($row, $col)->Comment->Text(); -- note that you don't have to store everything into an intermediate variable, you can just string it all together if it makes sense.
Also note that this is untested -- and you should think about adding checks to each of your function calls to ensure that they completed successfully.
Update: I should take my own advice. Test the function call return.
|
|---|