in reply to Win32::OLE AddComment method and MS Office 2013

TIA for any pointers/info.

Did ->Cells() succeed? What is the Count?

Did you compare the 2003 and 2013 docs side by side (or both Cells and AddComment)?

  • Comment on Re: Win32::OLE AddComment method and MS Office 2013

Replies are listed 'Best First'.
Re^2: Win32::OLE AddComment method and MS Office 2013
by woland99 (Beadle) on Nov 10, 2014 at 16:50 UTC
    Yes.
    $wsheet->Cells($row_num,$col_num)
    is a defined Win32::OLE object. You can examine it in debugger and property 'Comment' is 'null' before and after call to AddComment. Docs for that call in 2003 and 2013 are the same. For now I used WriteExcel module as a quick workaround.

      s a defined Win32::OLE object.

      Yeah, it should always be a defined Win32::OLE object, because Cells() is documented to always return a Range ... even if the range is EMPTY

        I think I located the problem. My code was using modular approach - first add/modify spreadsheet content then a separate routine was adding/modifying comments. I think that there is some problem in the way I handle Excel object in between those two calls. If I combine writing out content and adding comments into one function then program works. Should be simple to debug now. Many thanks for all the answers!