Closed arjun0722 closed 1 year ago
Tried eveything , but can't add comment to the selected cells
here is code get from the documentation await Excel.run(async (context) => { // Add a comment to A2 on the "MyWorksheet" worksheet. let comments = context.workbook.comments;
// Note that an InvalidArgument error will be thrown if multiple cells passed to `Comment.add`.
comments.add("MyWorksheet!A2", "TODO: add data.");
await context.sync();
});
error : helper.ts:132
RichApi.Error: This operation is not implemented.
at new n (excel-win32-16.01.js:25:242353)
at i.processRequestExecutorResponseMessage (excel-win32-16.01.js:25:306519)
at excel-win32-16.01.js:25:304582
The first argument of your "add" call refers to address "MyWorksheet!A2" which is specifically looking for cell 'A2' on a worksheet named 'MyWorksheet' (not the first code comment). If you Excel doc doesn't have a worksheet named 'MyWorksheet' (note the default name on a new document is 'Sheet 1') then you get this error.
yes i know this , but still getting this error ("RichApi.Error: This operation is not implemented.") even i cant set comment in single cell ,though i want to set comment on selectedrange , like if i select 10 cells comment should render on all cells , also want to know how to delete comment on selected cells . i am reading this doc https://learn.microsoft.com/en-us/office/dev/add-ins/excel/excel-add-ins-comments but getting error i mentioned above , if you have any other docs for set comment and delete comment on selected cells so plks share me . thanku @millerds @yinaa @NT-D @shashishailaj
Prerequisites
Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
Expected behavior
Please describe the behavior you were expecting
Current behavior
Please provide information about the failure. What is the current behavior? If it is not a bug, please submit your idea to the Microsoft Tech Community Ideas forum, so that it gets added to our feature roadmap.
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Failure Logs
Please include any relevant log snippets, screenshots or code samples here.