I’m currently working in a rewrite of a VSTO-based add-in in Office JS. Our old add-in created some template sheets for users to fill which are then used for data upload.
We’re trying to make our existing templates to be compatible with the new add-in, as creating them would add a lot of work to our end-users. The previous add-in used tooltips in some of the cells to explain what the input data is and how it should look like.
As far as I know, the Excel API for Office JS still lacks the ability to work with tooltips and it suggests using Comments instead, so I’m trying to put the same information as comments; but when I try to add a comment over the specified cell address, I’m getting the following error:
{code: "InvalidOperation", message: "This operation is not permitted for the current object.", toString: Function, errorLocation: "CommentCollection.add", statement: "var add2 = comments.add(...);", ...}
I made sure that the sheet is unprotected before calling comments.add
, so I’m not sure where the problem comes from. Might be due to the fact that there’s a tooltip already in the target cell?