Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Excel OLE list of comments methnods

by esr (Scribe)
on Jan 29, 2026 at 16:36 UTC ( [id://11167268]=perlquestion: print w/replies, xml ) Need Help??

esr has asked for the wisdom of the Perl Monks concerning the following question:

In Excel using OLE, one can access the threaded comments using the CommentsThreaded collection. Entries in that collection can be read with code like  $comment->Text; and  $comment->Delete;. Is there a list of other items that can be specified?

Replies are listed 'Best First'.
Re: Excel OLE list of comments methnods
by pryrt (Abbot) on Jan 29, 2026 at 16:59 UTC
    The official Excel VBA documention on the CommentsThreaded collection lists all the methods (Item()) as well as all the properties (Application, Count, Creator, and Parent) -- which all apply to the Collection as a whole. An individual element of that Collection would be a CommentThreaded object, with methods (AddReply(), Delete(), Next(), Previous(), and Text()) and properties (Application, Author, Creator, Date, Parent, and Replies).

    When using OLE from Perl, you just have to change the syntax from the MS documentation showing VBA syntax, and use the equivalent syntax in Perl, for referencing elements of arrays or for calling a method or accessing a property on an object. I don't have Excel available anymore to test, but I believe it's just the simple $comment->AddReply("Current sales") (similar to the AddReply() example) or $comment->{Date} to get the Date of the particular $comment.

    But the MS documentation for the Excel VBA interface is where you go to find all the methods and properties for any given object, even though you're using Perl instead of VBA.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11167268]
Approved by Corion
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2026-02-09 08:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.