cell.c generates note instead of comment in an Excel file. #2542

Closed
opened 2022-03-04 11:45:00 +00:00 by pwksn · 1 comment
pwksn commented 2022-03-04 11:45:00 +00:00 (Migrated from github.com)

Hi, trying to add a comment to a cell, which (according to the docs) can be done by setting value of cell.c to a given object containing the author and the comment itself. That works almost ideal, but what I get in the generated Excel file is a note instead of a comment. I'm assuming that it can be caused by the change that was made by Microsoft here: https://support.microsoft.com/en-us/office/the-difference-between-threaded-comments-and-notes-75a51eec-4092-42ab-abf8-7669077b7be3.
Is there any way to generate a comment instead of a note?
Thanks in advance.

Hi, trying to add a comment to a cell, which (according to the docs) can be done by setting value of cell.c to a given object containing the author and the comment itself. That works almost ideal, but what I get in the generated Excel file is a note instead of a comment. I'm assuming that it can be caused by the change that was made by Microsoft here: https://support.microsoft.com/en-us/office/the-difference-between-threaded-comments-and-notes-75a51eec-4092-42ab-abf8-7669077b7be3. Is there any way to generate a comment instead of a note? Thanks in advance.
SheetJSDev commented 2022-03-13 10:48:25 +00:00 (Migrated from github.com)

In the past, "Notes" were pure VML while "Comments" were XML. This works in Excel 2007 through 2016 and older versions of Excel 2019.

With the update, they relegated the comments to "Notes" status and introduced the new threaded comments.

Excel did not even preserve the message correctly. It now adds a preamble in the original comment for both XLSX and XLSB files:

<t xml:space="preserve">[Threaded comment]

Your version of Excel allows you to read this threaded comment; however, any edits to it will get removed if the file is opened in a newer version of Excel. Learn more: https://go.microsoft.com/fwlink/?linkid=870924

Comment:
    Message
Reply:
    Reply
</t>

So from the looks of things, at least parsing will have to be implemented.

In the past, "Notes" were pure VML while "Comments" were XML. This works in Excel 2007 through 2016 and older versions of Excel 2019. With the update, they relegated the comments to "Notes" status and introduced the new threaded comments. Excel did not even preserve the message correctly. It now adds a preamble in the original comment for both XLSX and XLSB files: ```xml <t xml:space="preserve">[Threaded comment] Your version of Excel allows you to read this threaded comment; however, any edits to it will get removed if the file is opened in a newer version of Excel. Learn more: https://go.microsoft.com/fwlink/?linkid=870924 Comment: Message Reply: Reply </t> ``` So from the looks of things, at least parsing will have to be implemented.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#2542
No description provided.